From: Nicolas Thill <nico@openwrt.org>
Date: Wed, 24 Sep 2008 13:27:46 +0000 (+0000)
Subject: fix button-hotplug build on kernel versions where BIT_MASK is not defined (< 2.6.24)
X-Git-Tag: reboot~25538
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=adea7e58b70fcd2422aaaee9b4fdc1381f0740b3;p=openwrt%2Fopenwrt.git

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

SVN-Revision: 12682
---

diff --git a/package/button-hotplug/src/button-hotplug.c b/package/button-hotplug/src/button-hotplug.c
index f76b9277fd..4bdf36435a 100644
--- a/package/button-hotplug/src/button-hotplug.c
+++ b/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;