summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/otg.h
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2014-05-23 04:12:49 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-23 06:35:02 +0400
commitbe6b0c1bd0be7a4f4d75ab40965abf1bd2d9a591 (patch)
treef93029af1564edb9276d1ccece6f4955d442d7ff /drivers/usb/chipidea/otg.h
parent2dbd633f3a5ec60cec1bb33b86513d768730681b (diff)
downloadlinux-be6b0c1bd0be7a4f4d75ab40965abf1bd2d9a591.tar.xz
usb: chipidea: using one inline function to cover queue work operations
The otg queue work include operations: one is disable interrupt, another one is call kernel queue work API. Many codes do this operation, using one inline function to instead of them. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/otg.h')
-rw-r--r--drivers/usb/chipidea/otg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h
index 734926754113..9ecb598e48f0 100644
--- a/drivers/usb/chipidea/otg.h
+++ b/drivers/usb/chipidea/otg.h
@@ -17,5 +17,10 @@ int ci_hdrc_otg_init(struct ci_hdrc *ci);
void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
enum ci_role ci_otg_role(struct ci_hdrc *ci);
void ci_handle_vbus_change(struct ci_hdrc *ci);
+static inline void ci_otg_queue_work(struct ci_hdrc *ci)
+{
+ disable_irq_nosync(ci->irq);
+ queue_work(ci->wq, &ci->work);
+}
#endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */