]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: udc-core: move sysfs_notify() to a workqueue
authorFelipe Balbi <balbi@ti.com>
Wed, 17 Jul 2013 08:09:49 +0000 (11:09 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 29 Jul 2013 10:57:02 +0000 (13:57 +0300)
commit86754b51b82dd78e27e57b56e3492e097fb89ecb
tree92a45aca9238a714ca0472436e3563e6033de1f6
parenta040c96f4215fb47f4f839dda9ddc328a489cc25
usb: gadget: udc-core: move sysfs_notify() to a workqueue

usb_gadget_set_state() will call sysfs_notify()
which might sleep. Some users might want to call
usb_gadget_set_state() from the very IRQ handler
which actually changes the gadget state.

Instead of having every UDC driver add their own
workqueue for such a simple notification, we're
adding it generically to our struct usb_gadget,
so the details are hidden from all UDC drivers.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc-core.c
include/linux/usb/gadget.h