diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-19 02:40:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:42 -0400 |
commit | 7b19ada2ed3c1eccb9fe94d74b05e1428224663d (patch) | |
tree | a0c5975ce5236ff4023b92d431bd0a8fa321c6ce /drivers/input/input.c | |
parent | d05be13bcc6ec615fb2e9556a9b85d52800669b6 (diff) |
get rid of input BIT* duplicate defines
get rid of input BIT* duplicate defines
use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 2f2b020cd629..307c7b5c2b33 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -584,10 +584,10 @@ static int input_default_setkeycode(struct input_dev *dev, | |||
584 | 584 | ||
585 | 585 | ||
586 | #define MATCH_BIT(bit, max) \ | 586 | #define MATCH_BIT(bit, max) \ |
587 | for (i = 0; i < NBITS(max); i++) \ | 587 | for (i = 0; i < BITS_TO_LONGS(max); i++) \ |
588 | if ((id->bit[i] & dev->bit[i]) != id->bit[i]) \ | 588 | if ((id->bit[i] & dev->bit[i]) != id->bit[i]) \ |
589 | break; \ | 589 | break; \ |
590 | if (i != NBITS(max)) \ | 590 | if (i != BITS_TO_LONGS(max)) \ |
591 | continue; | 591 | continue; |
592 | 592 | ||
593 | static const struct input_device_id *input_match_device(const struct input_device_id *id, | 593 | static const struct input_device_id *input_match_device(const struct input_device_id *id, |
@@ -698,7 +698,7 @@ static void input_seq_print_bitmap(struct seq_file *seq, const char *name, | |||
698 | { | 698 | { |
699 | int i; | 699 | int i; |
700 | 700 | ||
701 | for (i = NBITS(max) - 1; i > 0; i--) | 701 | for (i = BITS_TO_LONGS(max) - 1; i > 0; i--) |
702 | if (bitmap[i]) | 702 | if (bitmap[i]) |
703 | break; | 703 | break; |
704 | 704 | ||
@@ -892,7 +892,7 @@ static int input_print_modalias_bits(char *buf, int size, | |||
892 | 892 | ||
893 | len += snprintf(buf, max(size, 0), "%c", name); | 893 | len += snprintf(buf, max(size, 0), "%c", name); |
894 | for (i = min_bit; i < max_bit; i++) | 894 | for (i = min_bit; i < max_bit; i++) |
895 | if (bm[LONG(i)] & BIT(i)) | 895 | if (bm[BIT_WORD(i)] & BIT_MASK(i)) |
896 | len += snprintf(buf + len, max(size - len, 0), "%X,", i); | 896 | len += snprintf(buf + len, max(size - len, 0), "%X,", i); |
897 | return len; | 897 | return len; |
898 | } | 898 | } |
@@ -991,7 +991,7 @@ static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap, | |||
991 | int i; | 991 | int i; |
992 | int len = 0; | 992 | int len = 0; |
993 | 993 | ||
994 | for (i = NBITS(max) - 1; i > 0; i--) | 994 | for (i = BITS_TO_LONGS(max) - 1; i > 0; i--) |
995 | if (bitmap[i]) | 995 | if (bitmap[i]) |
996 | break; | 996 | break; |
997 | 997 | ||