]> git.openfabrics.org - ~emulex/compat.git/commitdiff
compat backport no_printk
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 17 Dec 2010 22:41:37 +0000 (14:41 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 18 Dec 2010 20:07:00 +0000 (12:07 -0800)
This is needed by brcm80211.

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

index 83b7f0621d5ca5c5ee703a477e3dcd913c2cbda5..1f2f5076c3915891c253067e56c075e7090b6f26 100644 (file)
@@ -90,6 +90,13 @@ struct pm_qos_request_list {
 
 #endif
 
+/*
+ * Dummy printk for disabled debugging statements to use whilst maintaining
+ * gcc's format and side-effect checking.
+ */
+static inline __attribute__ ((format (printf, 1, 2)))
+int no_printk(const char *s, ...) { return 0; }
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */
 
 #endif /* LINUX_26_36_COMPAT_H */