diff options
author | Peter Chen <peter.chen@freescale.com> | 2014-05-23 04:12:49 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-23 06:35:02 +0400 |
commit | be6b0c1bd0be7a4f4d75ab40965abf1bd2d9a591 (patch) | |
tree | f93029af1564edb9276d1ccece6f4955d442d7ff /drivers/usb/chipidea/otg.h | |
parent | 2dbd633f3a5ec60cec1bb33b86513d768730681b (diff) | |
download | linux-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.h | 5 |
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 */ |