提交 a4607d9f 编写于 作者: H Heikki Krogerus 提交者: Anton Vorontsov

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: NHeikki Krogerus <heikki.krogerus@nokia.com>
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 bac43b20
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册