aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/aiptek.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/aiptek.c')
-rw-r--r--drivers/usb/input/aiptek.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index 0e2505c073db..a6693b0d1c4c 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -338,7 +338,7 @@ struct aiptek {
338 * the bitmap which comes from the tablet. This hides the 338 * the bitmap which comes from the tablet. This hides the
339 * issue that the F_keys are not sequentially numbered. 339 * issue that the F_keys are not sequentially numbered.
340 */ 340 */
341static int macroKeyEvents[] = { 341static const int macroKeyEvents[] = {
342 KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, 342 KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5,
343 KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, 343 KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11,
344 KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17, 344 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)
2093 /* Programming the tablet macro keys needs to be done with a for loop 2093 /* Programming the tablet macro keys needs to be done with a for loop
2094 * as the keycodes are discontiguous. 2094 * as the keycodes are discontiguous.
2095 */ 2095 */
2096 for (i = 0; i < sizeof(macroKeyEvents) / sizeof(macroKeyEvents[0]); ++i) 2096 for (i = 0; i < ARRAY_SIZE(macroKeyEvents); ++i)
2097 set_bit(macroKeyEvents[i], inputdev->keybit); 2097 set_bit(macroKeyEvents[i], inputdev->keybit);
2098 2098
2099 /* 2099 /*
@@ -2135,7 +2135,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
2135 * not an error :-) 2135 * not an error :-)
2136 */ 2136 */
2137 2137
2138 for (i = 0; i < sizeof(speeds) / sizeof(speeds[0]); ++i) { 2138 for (i = 0; i < ARRAY_SIZE(speeds); ++i) {
2139 aiptek->curSetting.programmableDelay = speeds[i]; 2139 aiptek->curSetting.programmableDelay = speeds[i];
2140 (void)aiptek_program_tablet(aiptek); 2140 (void)aiptek_program_tablet(aiptek);
2141 if (aiptek->inputdev->absmax[ABS_X] > 0) { 2141 if (aiptek->inputdev->absmax[ABS_X] > 0) {
@@ -2190,7 +2190,6 @@ fail1: input_free_device(inputdev);
2190static void aiptek_disconnect(struct usb_interface *intf); 2190static void aiptek_disconnect(struct usb_interface *intf);
2191 2191
2192static struct usb_driver aiptek_driver = { 2192static struct usb_driver aiptek_driver = {
2193 .owner = THIS_MODULE,
2194 .name = "aiptek", 2193 .name = "aiptek",
2195 .probe = aiptek_probe, 2194 .probe = aiptek_probe,
2196 .disconnect = aiptek_disconnect, 2195 .disconnect = aiptek_disconnect,