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>
This commit is contained in:
Heikki Krogerus 2010-11-04 16:31:48 +02:00 committed by Anton Vorontsov
parent bac43b2050
commit a4607d9f5c
1 changed files with 3 additions and 3 deletions

View File

@ -391,13 +391,13 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
if (!isp->otg) if (!isp->otg)
goto fail0; goto fail0;
isp->dev = &pdev->dev;
platform_set_drvdata(pdev, isp);
ret = isp1704_test_ulpi(isp); ret = isp1704_test_ulpi(isp);
if (ret < 0) if (ret < 0)
goto fail1; goto fail1;
isp->dev = &pdev->dev;
platform_set_drvdata(pdev, isp);
isp->psy.name = "isp1704"; isp->psy.name = "isp1704";
isp->psy.type = POWER_SUPPLY_TYPE_USB; isp->psy.type = POWER_SUPPLY_TYPE_USB;
isp->psy.properties = power_props; isp->psy.properties = power_props;