diff options
Diffstat (limited to 'drivers/input/misc/cobalt_btns.c')
-rw-r--r-- | drivers/input/misc/cobalt_btns.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 4833b1a82623..5511ef006a66 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Cobalt button interface driver. | 2 | * Cobalt button interface driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -15,7 +15,7 @@ | |||
15 | * | 15 | * |
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/input-polldev.h> | 21 | #include <linux/input-polldev.h> |
@@ -55,7 +55,7 @@ static void handle_buttons(struct input_polled_dev *dev) | |||
55 | status = ~readl(bdev->reg) >> 24; | 55 | status = ~readl(bdev->reg) >> 24; |
56 | 56 | ||
57 | for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { | 57 | for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { |
58 | if (status & (1UL << i)) { | 58 | if (status & (1U << i)) { |
59 | if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { | 59 | if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { |
60 | input_event(input, EV_MSC, MSC_SCAN, i); | 60 | input_event(input, EV_MSC, MSC_SCAN, i); |
61 | input_report_key(input, bdev->keymap[i], 1); | 61 | input_report_key(input, bdev->keymap[i], 1); |
@@ -97,16 +97,16 @@ static int __devinit cobalt_buttons_probe(struct platform_device *pdev) | |||
97 | input->name = "Cobalt buttons"; | 97 | input->name = "Cobalt buttons"; |
98 | input->phys = "cobalt/input0"; | 98 | input->phys = "cobalt/input0"; |
99 | input->id.bustype = BUS_HOST; | 99 | input->id.bustype = BUS_HOST; |
100 | input->cdev.dev = &pdev->dev; | 100 | input->dev.parent = &pdev->dev; |
101 | 101 | ||
102 | input->keycode = pdev->keymap; | 102 | input->keycode = bdev->keymap; |
103 | input->keycodemax = ARRAY_SIZE(pdev->keymap); | 103 | input->keycodemax = ARRAY_SIZE(bdev->keymap); |
104 | input->keycodesize = sizeof(unsigned short); | 104 | input->keycodesize = sizeof(unsigned short); |
105 | 105 | ||
106 | input_set_capability(input, EV_MSC, MSC_SCAN); | 106 | input_set_capability(input, EV_MSC, MSC_SCAN); |
107 | __set_bit(EV_KEY, input->evbit); | 107 | __set_bit(EV_KEY, input->evbit); |
108 | for (i = 0; i < ARRAY_SIZE(buttons_map); i++) | 108 | for (i = 0; i < ARRAY_SIZE(cobalt_map); i++) |
109 | __set_bit(input->keycode[i], input->keybit); | 109 | __set_bit(bdev->keymap[i], input->keybit); |
110 | __clear_bit(KEY_RESERVED, input->keybit); | 110 | __clear_bit(KEY_RESERVED, input->keybit); |
111 | 111 | ||
112 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 112 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |