]> git.kernelconcepts.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>
Fri, 24 May 2013 12:21:58 +0000 (14:21 +0200)
===================================================================

drivers/usb/otg/fsl_otg.c

index aa153e25c72d9e99fa592829ba913fafe9166a54..dc7d01e6c6920f79769d6c2334d72a05d1659a4d 100755 (executable)
@@ -614,6 +614,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;