diff options
Diffstat (limited to 'include/adriver.h')
-rw-r--r-- | include/adriver.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/adriver.h b/include/adriver.h index 75440c10b..0ffb00a4c 100644 --- a/include/adriver.h +++ b/include/adriver.h @@ -1974,6 +1974,21 @@ static inline bool flush_delayed_work_sync(struct delayed_work *dwork) #define cancel_work_sync flush_work #endif +/* system-wide workqueues */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +#define system_wq (struct workqueue_struct *)-1L +#define system_long_wq (struct workqueue_struct *)-1L +static inline int _snd_queue_work(struct workqueue_struct *wq, + struct work_struct *work) +{ + if (wq == system_wq || wq == system_long_wq) + return schedule_work(work); + else + return queue_work(wq, work); +} +#define queue_work(wq, work) _snd_queue_work(wq, work) +#endif + #endif /* < 2.6.37 */ /* pm_wakeup_event() wrapper */ |