summaryrefslogtreecommitdiffstats
path: root/drivers/power/isp1704_charger.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@nokia.com>2010-11-04 16:31:48 +0200
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-11-18 16:56:20 +0300
commita4607d9f5cbae1aad7f86e8204b57d66c0e14e36 (patch)
treeade06599b0c57548667452558c51b1b5ed81abbb /drivers/power/isp1704_charger.c
parentbac43b20501058ab0728246acce3bb85f2e72648 (diff)
downloadop-kernel-dev-a4607d9f5cbae1aad7f86e8204b57d66c0e14e36.zip
op-kernel-dev-a4607d9f5cbae1aad7f86e8204b57d66c0e14e36.tar.gz
isp1704_charger: Set isp->dev before anything needs it
isp1704_test_ulpi() is the first place that needs isp->dev member, so it must be set before calling the function. Signed-off-by: Heikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/isp1704_charger.c')
-rw-r--r--drivers/power/isp1704_charger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c
index 10c7cc5..77c11f1 100644
--- a/drivers/power/isp1704_charger.c
+++ b/drivers/power/isp1704_charger.c
@@ -391,13 +391,13 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
if (!isp->otg)
goto fail0;
+ isp->dev = &pdev->dev;
+ platform_set_drvdata(pdev, isp);
+
ret = isp1704_test_ulpi(isp);
if (ret < 0)
goto fail1;
- isp->dev = &pdev->dev;
- platform_set_drvdata(pdev, isp);
-
isp->psy.name = "isp1704";
isp->psy.type = POWER_SUPPLY_TYPE_USB;
isp->psy.properties = power_props;
OpenPOWER on IntegriCloud