]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
0020-prevent-fsl-otg-unload-inuse
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 12:21:58 +0000 (14:21 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 29 Oct 2013 11:54:15 +0000 (12:54 +0100)
===================================================================

drivers/usb/otg/fsl_otg.c

index d05aaec1c0671df0165731e15786ca37fb60708e..656f9dcd457a95b553a55103e343e18424f5bef2 100755 (executable)
@@ -610,6 +610,12 @@ static int fsl_otg_set_host(struct otg_transceiver *otg_p, struct usb_bus *host)
        if (!otg_p || otg_dev != fsl_otg_dev)
                return -ENODEV;
 
+       if (host) {
+               __module_get(THIS_MODULE);
+       } else {
+               module_put(THIS_MODULE);
+       }
+
        otg_p->host = host;
 
        otg_dev->fsm.a_bus_drop = 0;