]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: backport alloc_workqueue
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 1 Jan 2011 14:23:34 +0000 (06:23 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 5 Jan 2011 23:20:09 +0000 (15:20 -0800)
This is needed by rtlwifi.

The function signature of __create_workqueue changed in kernel 2.6.28,
so two different defines are needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.28.h
include/linux/compat-2.6.36.h

index b9024d67168b43813439c10cb06e9ab9b57c4325..fdb8fb2cc261269777fec25f4511ffa273601240 100644 (file)
@@ -236,6 +236,8 @@ extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
 
 int pci_wake_from_d3(struct pci_dev *dev, bool enable);
 
+#define alloc_workqueue(name, flags, max_active) __create_workqueue(name, flags, max_active)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */
 
 #endif /* LINUX_26_28_COMPAT_H */
index 1f2f5076c3915891c253067e56c075e7090b6f26..74d2309d441aba05db6eab001748eabfdd3f4841 100644 (file)
@@ -97,6 +97,10 @@ struct pm_qos_request_list {
 static inline __attribute__ ((format (printf, 1, 2)))
 int no_printk(const char *s, ...) { return 0; }
 
+#ifndef alloc_workqueue
+#define alloc_workqueue(name, flags, max_active) __create_workqueue(name, flags, max_active, 0)
+#endif
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */
 
 #endif /* LINUX_26_36_COMPAT_H */