This prevents the USB PHY refcount to be decremented below zero upon
unloading the ci-hdrc-imx module.

Signed-off-by: Lothar Waßmann <l...@karo-electronics.de>
---
 drivers/usb/chipidea/ci_hdrc_imx.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c 
b/drivers/usb/chipidea/ci_hdrc_imx.c
index 14362c0..802eab1 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -218,10 +218,8 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev)
        if (data->reg_vbus)
                regulator_disable(data->reg_vbus);
 
-       if (data->phy) {
+       if (data->phy)
                usb_phy_shutdown(data->phy);
-               module_put(data->phy->dev->driver->owner);
-       }
 
        clk_disable_unprepare(data->clk);
 
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to