aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2014-11-26 00:44:34 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-26 12:28:12 -0500
commit14b4099c074f2ddf4d84b22d370170e61b527529 (patch)
treef0194492b2bfebdd861faef0d19f75a7daac0562
parent5b1573005a91dc448e6919d6bec076bedc7e1919 (diff)
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: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/chipidea/core.c2
-rw-r--r--drivers/usb/chipidea/host.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index e43be34f04b9..de1e4a84aa93 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -669,6 +669,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
669 if (!ci) 669 if (!ci)
670 return -ENOMEM; 670 return -ENOMEM;
671 671
672 platform_set_drvdata(pdev, ci);
672 ci->dev = dev; 673 ci->dev = dev;
673 ci->platdata = dev_get_platdata(dev); 674 ci->platdata = dev_get_platdata(dev);
674 ci->imx28_write_fix = !!(ci->platdata->flags & 675 ci->imx28_write_fix = !!(ci->platdata->flags &
@@ -782,7 +783,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
782 } 783 }
783 } 784 }
784 785
785 platform_set_drvdata(pdev, ci);
786 ret = devm_request_irq(dev, ci->irq, ci_irq, IRQF_SHARED, 786 ret = devm_request_irq(dev, ci->irq, ci_irq, IRQF_SHARED,
787 ci->platdata->name, ci); 787 ci->platdata->name, ci);
788 if (ret) 788 if (ret)
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 48731d0bab35..c1694cff1eaf 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -91,7 +91,6 @@ static int host_start(struct ci_hdrc *ci)
91 if (!hcd) 91 if (!hcd)
92 return -ENOMEM; 92 return -ENOMEM;
93 93
94 dev_set_drvdata(ci->dev, ci);
95 hcd->rsrc_start = ci->hw_bank.phys; 94 hcd->rsrc_start = ci->hw_bank.phys;
96 hcd->rsrc_len = ci->hw_bank.size; 95 hcd->rsrc_len = ci->hw_bank.size;
97 hcd->regs = ci->hw_bank.abs; 96 hcd->regs = ci->hw_bank.abs;