aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>2008-03-14 11:52:37 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-03-14 11:52:37 -0400
commit3c514387bd24c41a0cbb434f59e4727e5829cc8e (patch)
treef34f3b9f7395af10a8b0b25a68a87ce255fd3db1 /drivers/input
parentbaadac8b10c5ac15ce3d26b68fa266c8889b163f (diff)
Input: cobalt_btns - assorted fixes
- fix compile errors (keymap is in bdev, not pdev) - cdev is no more (must use dev.parent) - update copiright notice Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/cobalt_btns.c16
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);