summaryrefslogtreecommitdiffstats
path: root/drivers/usb/input
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2005-12-11 16:20:08 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 13:51:43 -0800
commit52950ed40dc97456209979af1d8f51b63cf6dcab (patch)
tree527fb1a339889b3df9d227b1c17f87bc487f397f /drivers/usb/input
parentf3d34ed48c80903544b509031fee64838d29f35f (diff)
downloadlinux-52950ed40dc97456209979af1d8f51b63cf6dcab.tar.gz
linux-52950ed40dc97456209979af1d8f51b63cf6dcab.tar.bz2
linux-52950ed40dc97456209979af1d8f51b63cf6dcab.zip
[PATCH] USB: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed. Patch is compile-tested on i386. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/input')
-rw-r--r--drivers/usb/input/aiptek.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index 87ae08c99bc4..a6693b0d1c4c 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -2093,7 +2093,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
/* Programming the tablet macro keys needs to be done with a for loop
* as the keycodes are discontiguous.
*/
- for (i = 0; i < sizeof(macroKeyEvents) / sizeof(macroKeyEvents[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(macroKeyEvents); ++i)
set_bit(macroKeyEvents[i], inputdev->keybit);
/*
@@ -2135,7 +2135,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
* not an error :-)
*/
- for (i = 0; i < sizeof(speeds) / sizeof(speeds[0]); ++i) {
+ for (i = 0; i < ARRAY_SIZE(speeds); ++i) {
aiptek->curSetting.programmableDelay = speeds[i];
(void)aiptek_program_tablet(aiptek);
if (aiptek->inputdev->absmax[ABS_X] > 0) {