mtp: solve open_excl lock problem
authorhwg <hwg@rock-chips.com>
Thu, 13 Sep 2012 03:15:37 +0000 (11:15 +0800)
committerhwg <hwg@rock-chips.com>
Thu, 13 Sep 2012 03:31:31 +0000 (11:31 +0800)
drivers/usb/gadget/f_mtp.c

index 034cdf68f9f6462219509c28af0a1d45ec7f564b..363e7c0d0add4b81095aa942397419b6101c19b4 100755 (executable)
@@ -1165,6 +1165,8 @@ static int mtp_function_set_alt(struct usb_function *f,
                return ret;
        }
        dev->state = STATE_READY;
+       
+       atomic_set(&dev->open_excl, 0); // solve open_excl lock problem, add by Huweiguo
 
        /* readers may be blocked waiting for us to go online */
        wake_up(&dev->read_wq);