diff options
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 | ||