usb: chipidea: remove duplicate dev_set_drvdata for host_start
authorPeter Chen <peter.chen@freescale.com>
Wed, 26 Nov 2014 05:44:34 +0000 (13:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 17:28:12 +0000 (09:28 -0800)
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>
drivers/usb/chipidea/core.c
drivers/usb/chipidea/host.c

index e43be34f04b9c40ede1bacef5e45e1fe1bffc3f5..de1e4a84aa93aa0f13f386765f0d78eb4ba28750 100644 (file)
@@ -669,6 +669,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
        if (!ci)
                return -ENOMEM;
 
+       platform_set_drvdata(pdev, ci);
        ci->dev = dev;
        ci->platdata = dev_get_platdata(dev);
        ci->imx28_write_fix = !!(ci->platdata->flags &
@@ -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,
                        ci->platdata->name, ci);
        if (ret)
index 48731d0bab357a75232fdbd7b4063fe29af3ad4e..c1694cff1eafd287c600435a45c861a4406e6514 100644 (file)
@@ -91,7 +91,6 @@ static int host_start(struct ci_hdrc *ci)
        if (!hcd)
                return -ENOMEM;
 
-       dev_set_drvdata(ci->dev, ci);
        hcd->rsrc_start = ci->hw_bank.phys;
        hcd->rsrc_len = ci->hw_bank.size;
        hcd->regs = ci->hw_bank.abs;