浏览代码

fix button-hotplug build on kernel versions where BIT_MASK is not defined (< 2.6.24)

SVN-Revision: 12682
Nicolas Thill 17 年之前
父节点
当前提交
adea7e58b7
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      package/button-hotplug/src/button-hotplug.c

+ 4 - 0
package/button-hotplug/src/button-hotplug.c

@@ -46,6 +46,10 @@
 
 #define BH_ERR(fmt, args...) printk(KERN_ERR "%s: " fmt, DRV_NAME, ##args )
 
+#ifndef BIT_MASK
+#define BIT_MASK(nr)            (1UL << ((nr) % BITS_PER_LONG))
+#endif
+
 struct bh_priv {
 	unsigned long		seen[BH_BTN_COUNT];
 	struct input_handle	handle;