From: Marcus Nutzinger Date: Thu, 5 Jun 2014 15:17:06 +0000 (+0200) Subject: usb: gadget: gadgetfs: correct dev state X-Git-Tag: omap-for-v3.16/fixes-rc4~20^2~9^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0cae93f3f7e9a26c2d6bc182204c37dec3698eb;p=pandora-kernel.git usb: gadget: gadgetfs: correct dev state This reverts commit 1826e9b1 (usb: gadget: gadgetfs: use after free in dev_release()) and places the call to put_dev() after setting the state. If this is not the final call to dev_release() and the state is not reset to STATE_DEV_DISABLED and hence all further open() calls to the gadgetfs ep0 device will fail with EBUSY. Signed-off-by: Marcus Nutzinger Reviewed-by: Christoph Muellner Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed