diff options
Diffstat (limited to 'drivers/usb/input/aiptek.c')
-rw-r--r-- | drivers/usb/input/aiptek.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index 0e2505c073d..a6693b0d1c4 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c @@ -338,7 +338,7 @@ struct aiptek { * the bitmap which comes from the tablet. This hides the * issue that the F_keys are not sequentially numbered. */ -static int macroKeyEvents[] = { +static const int macroKeyEvents[] = { KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17, @@ -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) { @@ -2190,7 +2190,6 @@ fail1: input_free_device(inputdev); static void aiptek_disconnect(struct usb_interface *intf); static struct usb_driver aiptek_driver = { - .owner = THIS_MODULE, .name = "aiptek", .probe = aiptek_probe, .disconnect = aiptek_disconnect, |