summaryrefslogtreecommitdiff
path: root/package/button-hotplug
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2008-09-24 13:27:46 +0000
committerNicolas Thill <nico@openwrt.org>2008-09-24 13:27:46 +0000
commitadea7e58b70fcd2422aaaee9b4fdc1381f0740b3 (patch)
treee60ada4657f1b641873890daafb81c525192233f /package/button-hotplug
parent34a1fe969e408652eb48e8a07cfe90ad66dc2357 (diff)
downloadmtk-20170518-adea7e58b70fcd2422aaaee9b4fdc1381f0740b3.zip
mtk-20170518-adea7e58b70fcd2422aaaee9b4fdc1381f0740b3.tar.gz
mtk-20170518-adea7e58b70fcd2422aaaee9b4fdc1381f0740b3.tar.bz2
fix button-hotplug build on kernel versions where BIT_MASK is not defined (< 2.6.24)
SVN-Revision: 12682
Diffstat (limited to 'package/button-hotplug')
-rw-r--r--package/button-hotplug/src/button-hotplug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/button-hotplug/src/button-hotplug.c b/package/button-hotplug/src/button-hotplug.c
index f76b927..4bdf364 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;