Commit 14b4099c authored by Peter Chen's avatar Peter Chen Committed by Greg Kroah-Hartman

usb: chipidea: remove duplicate dev_set_drvdata for host_start

The core driver has already done it, besides, move set driver data
operation just after ci has allocated successfully in case some
code (like ci_role_start) want to access this driver data.
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5b157300
...@@ -669,6 +669,7 @@ static int ci_hdrc_probe(struct platform_device *pdev) ...@@ -669,6 +669,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
if (!ci) if (!ci)
return -ENOMEM; return -ENOMEM;
platform_set_drvdata(pdev, ci);
ci->dev = dev; ci->dev = dev;
ci->platdata = dev_get_platdata(dev); ci->platdata = dev_get_platdata(dev);
ci->imx28_write_fix = !!(ci->platdata->flags & ci->imx28_write_fix = !!(ci->platdata->flags &
...@@ -782,7 +783,6 @@ static int ci_hdrc_probe(struct platform_device *pdev) ...@@ -782,7 +783,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
} }
} }
platform_set_drvdata(pdev, ci);
ret = devm_request_irq(dev, ci->irq, ci_irq, IRQF_SHARED, ret = devm_request_irq(dev, ci->irq, ci_irq, IRQF_SHARED,
ci->platdata->name, ci); ci->platdata->name, ci);
if (ret) if (ret)
......
...@@ -91,7 +91,6 @@ static int host_start(struct ci_hdrc *ci) ...@@ -91,7 +91,6 @@ static int host_start(struct ci_hdrc *ci)
if (!hcd) if (!hcd)
return -ENOMEM; return -ENOMEM;
dev_set_drvdata(ci->dev, ci);
hcd->rsrc_start = ci->hw_bank.phys; hcd->rsrc_start = ci->hw_bank.phys;
hcd->rsrc_len = ci->hw_bank.size; hcd->rsrc_len = ci->hw_bank.size;
hcd->regs = ci->hw_bank.abs; hcd->regs = ci->hw_bank.abs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment