diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-12-13 15:39:34 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-12-13 15:39:34 +0100 |
commit | 150e7c20ac0d4cc7e8fa7994bb04b17cd2da9a88 (patch) | |
tree | 7d2981208cf91f304bc5134ff577c89a748fae06 | |
parent | 377e8e15dac8150acff8f8b8bcbac70254c27ad4 (diff) | |
download | alsa-driver-build-unstable-150e7c20ac0d4cc7e8fa7994bb04b17cd2da9a88.tar.gz |
Fix build with much older versions for flush_work_sync() wrapper
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/adriver.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/adriver.h b/include/adriver.h index 6cc93e3e6..bd6376531 100644 --- a/include/adriver.h +++ b/include/adriver.h @@ -1937,11 +1937,16 @@ static inline void *vzalloc(unsigned long size) #include <linux/workqueue.h> static inline bool flush_work_sync(struct work_struct *work) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) + /* XXX */ + flush_scheduled_work(); +#else if (!flush_work(work)) return false; while (flush_work(work)) ; return true; +#endif } static inline bool flush_delayed_work_sync(struct delayed_work *dwork) |