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