aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-08 01:31:11 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-05-08 01:31:11 -0400
commit334d0dd8b660557608142f0f77abc6812b48f08b (patch)
tree9393a9aa099d7d42deda5f9f5054796c0c769be7 /drivers/input
parent3f07d8796262f6aee135c8dd9a91210da9f888e4 (diff)
parent5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/evdev.c6
-rw-r--r--drivers/input/joydev.c6
-rw-r--r--drivers/input/keyboard/Kconfig11
-rw-r--r--drivers/input/keyboard/Makefile1
-rw-r--r--drivers/input/keyboard/atakbd.c134
-rw-r--r--drivers/input/keyboard/hilkbd.c2
-rw-r--r--drivers/input/mouse/Kconfig11
-rw-r--r--drivers/input/mouse/Makefile1
-rw-r--r--drivers/input/mouse/atarimouse.c160
-rw-r--r--drivers/input/mousedev.c6
-rw-r--r--drivers/input/touchscreen/hp680_ts_input.c2
-rw-r--r--drivers/input/tsdev.c6
12 files changed, 332 insertions, 14 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 0b45d475a1c6..a4c3729d3960 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -664,7 +664,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev,
664 } 664 }
665 665
666 /* temporary symlink to keep userspace happy */ 666 /* temporary symlink to keep userspace happy */
667 error = sysfs_create_link(&input_class.subsys.kset.kobj, 667 error = sysfs_create_link(&input_class.subsys.kobj,
668 &cdev->kobj, evdev->name); 668 &cdev->kobj, evdev->name);
669 if (error) 669 if (error)
670 goto err_cdev_destroy; 670 goto err_cdev_destroy;
@@ -676,7 +676,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev,
676 return 0; 676 return 0;
677 677
678 err_remove_link: 678 err_remove_link:
679 sysfs_remove_link(&input_class.subsys.kset.kobj, evdev->name); 679 sysfs_remove_link(&input_class.subsys.kobj, evdev->name);
680 err_cdev_destroy: 680 err_cdev_destroy:
681 class_device_destroy(&input_class, devt); 681 class_device_destroy(&input_class, devt);
682 err_free_evdev: 682 err_free_evdev:
@@ -692,7 +692,7 @@ static void evdev_disconnect(struct input_handle *handle)
692 692
693 input_unregister_handle(handle); 693 input_unregister_handle(handle);
694 694
695 sysfs_remove_link(&input_class.subsys.kset.kobj, evdev->name); 695 sysfs_remove_link(&input_class.subsys.kobj, evdev->name);
696 class_device_destroy(&input_class, 696 class_device_destroy(&input_class,
697 MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); 697 MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
698 evdev->exist = 0; 698 evdev->exist = 0;
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 4f37224d2268..9bcc5425049b 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -560,7 +560,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
560 } 560 }
561 561
562 /* temporary symlink to keep userspace happy */ 562 /* temporary symlink to keep userspace happy */
563 error = sysfs_create_link(&input_class.subsys.kset.kobj, 563 error = sysfs_create_link(&input_class.subsys.kobj,
564 &cdev->kobj, joydev->name); 564 &cdev->kobj, joydev->name);
565 if (error) 565 if (error)
566 goto err_cdev_destroy; 566 goto err_cdev_destroy;
@@ -572,7 +572,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
572 return 0; 572 return 0;
573 573
574 err_remove_link: 574 err_remove_link:
575 sysfs_remove_link(&input_class.subsys.kset.kobj, joydev->name); 575 sysfs_remove_link(&input_class.subsys.kobj, joydev->name);
576 err_cdev_destroy: 576 err_cdev_destroy:
577 class_device_destroy(&input_class, devt); 577 class_device_destroy(&input_class, devt);
578 err_free_joydev: 578 err_free_joydev:
@@ -589,7 +589,7 @@ static void joydev_disconnect(struct input_handle *handle)
589 589
590 input_unregister_handle(handle); 590 input_unregister_handle(handle);
591 591
592 sysfs_remove_link(&input_class.subsys.kset.kobj, joydev->name); 592 sysfs_remove_link(&input_class.subsys.kobj, joydev->name);
593 class_device_destroy(&input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); 593 class_device_destroy(&input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
594 joydev->exist = 0; 594 joydev->exist = 0;
595 595
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index cbf2abb061ad..bd707b86c114 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -164,6 +164,17 @@ config KEYBOARD_AMIGA
164 To compile this driver as a module, choose M here: the 164 To compile this driver as a module, choose M here: the
165 module will be called amikbd. 165 module will be called amikbd.
166 166
167config KEYBOARD_ATARI
168 tristate "Atari keyboard"
169 depends on ATARI
170 select ATARI_KBD_CORE
171 help
172 Say Y here if you are running Linux on any Atari and have a keyboard
173 attached.
174
175 To compile this driver as a module, choose M here: the
176 module will be called atakbd.
177
167config KEYBOARD_HIL_OLD 178config KEYBOARD_HIL_OLD
168 tristate "HP HIL keyboard support (simple driver)" 179 tristate "HP HIL keyboard support (simple driver)"
169 depends on GSC || HP300 180 depends on GSC || HP300
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
index fc1d1f263167..28d211b87b14 100644
--- a/drivers/input/keyboard/Makefile
+++ b/drivers/input/keyboard/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
9obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o 9obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o
10obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o 10obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
11obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o 11obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
12obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o
12obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o 13obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o
13obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o 14obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
14obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o 15obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c
new file mode 100644
index 000000000000..ded1d6ac6ff3
--- /dev/null
+++ b/drivers/input/keyboard/atakbd.c
@@ -0,0 +1,134 @@
1/*
2 * atakbd.c
3 *
4 * Copyright (c) 2005 Michael Schmitz
5 *
6 * Based on amikbd.c, which is
7 *
8 * Copyright (c) 2000-2001 Vojtech Pavlik
9 *
10 * Based on the work of:
11 * Hamish Macdonald
12 */
13
14/*
15 * Atari keyboard driver for Linux/m68k
16 *
17 * The low level init and interrupt stuff is handled in arch/mm68k/atari/atakeyb.c
18 * (the keyboard ACIA also handles the mouse and joystick data, and the keyboard
19 * interrupt is shared with the MIDI ACIA so MIDI data also get handled there).
20 * This driver only deals with handing key events off to the input layer.
21 */
22
23/*
24 * This program is free software; you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License as published by
26 * the Free Software Foundation; either version 2 of the License, or
27 * (at your option) any later version.
28 *
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
33 *
34 * You should have received a copy of the GNU General Public License
35 * along with this program; if not, write to the Free Software
36 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 *
38 * Should you need to contact me, the author, you can do so either by
39 * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
40 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
41 */
42
43#include <linux/module.h>
44#include <linux/init.h>
45#include <linux/input.h>
46#include <linux/delay.h>
47#include <linux/interrupt.h>
48
49#include <asm/atariints.h>
50#include <asm/atarihw.h>
51#include <asm/atarikb.h>
52#include <asm/irq.h>
53
54MODULE_AUTHOR("Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>");
55MODULE_DESCRIPTION("Atari keyboard driver");
56MODULE_LICENSE("GPL");
57
58static unsigned char atakbd_keycode[0x72];
59
60static struct input_dev *atakbd_dev;
61
62static void atakbd_interrupt(unsigned char scancode, char down)
63{
64
65 if (scancode < 0x72) { /* scancodes < 0xf2 are keys */
66
67 // report raw events here?
68
69 scancode = atakbd_keycode[scancode];
70
71 if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */
72 input_report_key(atakbd_dev, scancode, 1);
73 input_report_key(atakbd_dev, scancode, 0);
74 input_sync(atakbd_dev);
75 } else {
76 input_report_key(atakbd_dev, scancode, down);
77 input_sync(atakbd_dev);
78 }
79 } else /* scancodes >= 0xf2 are mouse data, most likely */
80 printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode);
81
82 return;
83}
84
85static int __init atakbd_init(void)
86{
87 int i;
88
89 if (!ATARIHW_PRESENT(ST_MFP))
90 return -EIO;
91
92 // TODO: request_mem_region if not done in arch code
93
94 if (!(atakbd_dev = input_allocate_device()))
95 return -ENOMEM;
96
97 // need to init core driver if not already done so
98 if (atari_keyb_init())
99 return -ENODEV;
100
101 atakbd_dev->name = "Atari Keyboard";
102 atakbd_dev->phys = "atakbd/input0";
103 atakbd_dev->id.bustype = BUS_ATARI;
104 atakbd_dev->id.vendor = 0x0001;
105 atakbd_dev->id.product = 0x0001;
106 atakbd_dev->id.version = 0x0100;
107
108 atakbd_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
109 atakbd_dev->keycode = atakbd_keycode;
110 atakbd_dev->keycodesize = sizeof(unsigned char);
111 atakbd_dev->keycodemax = ARRAY_SIZE(atakbd_keycode);
112
113 for (i = 1; i < 0x72; i++) {
114 atakbd_keycode[i] = i;
115 set_bit(atakbd_keycode[i], atakbd_dev->keybit);
116 }
117
118 input_register_device(atakbd_dev);
119
120 atari_input_keyboard_interrupt_hook = atakbd_interrupt;
121
122 printk(KERN_INFO "input: %s at IKBD ACIA\n", atakbd_dev->name);
123
124 return 0;
125}
126
127static void __exit atakbd_exit(void)
128{
129 atari_input_keyboard_interrupt_hook = NULL;
130 input_unregister_device(atakbd_dev);
131}
132
133module_init(atakbd_init);
134module_exit(atakbd_exit);
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c
index 73b85cb59830..499b6974457f 100644
--- a/drivers/input/keyboard/hilkbd.c
+++ b/drivers/input/keyboard/hilkbd.c
@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL v2");
52 52
53#elif defined(CONFIG_HP300) 53#elif defined(CONFIG_HP300)
54 54
55 #define HILBASE 0xf0428000 /* HP300 (m86k) port address */ 55 #define HILBASE 0xf0428000UL /* HP300 (m68k) port address */
56 #define HIL_DATA 0x1 56 #define HIL_DATA 0x1
57 #define HIL_CMD 0x3 57 #define HIL_CMD 0x3
58 #define HIL_IRQ 2 58 #define HIL_IRQ 2
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index d0d074457936..81dd8c7211a7 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -155,6 +155,17 @@ config MOUSE_AMIGA
155 To compile this driver as a module, choose M here: the 155 To compile this driver as a module, choose M here: the
156 module will be called amimouse. 156 module will be called amimouse.
157 157
158config MOUSE_ATARI
159 tristate "Atari mouse"
160 depends on ATARI
161 select ATARI_KBD_CORE
162 help
163 Say Y here if you have an Atari and want its native mouse
164 supported by the kernel.
165
166 To compile this driver as a module, choose M here: the
167 module will be called atarimouse.
168
158config MOUSE_RISCPC 169config MOUSE_RISCPC
159 tristate "Acorn RiscPC mouse" 170 tristate "Acorn RiscPC mouse"
160 depends on ARCH_ACORN 171 depends on ARCH_ACORN
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index 83477d5c7664..6a8f622927f2 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -5,6 +5,7 @@
5# Each configuration option enables a list of files. 5# Each configuration option enables a list of files.
6 6
7obj-$(CONFIG_MOUSE_AMIGA) += amimouse.o 7obj-$(CONFIG_MOUSE_AMIGA) += amimouse.o
8obj-$(CONFIG_MOUSE_ATARI) += atarimouse.o
8obj-$(CONFIG_MOUSE_RISCPC) += rpcmouse.o 9obj-$(CONFIG_MOUSE_RISCPC) += rpcmouse.o
9obj-$(CONFIG_MOUSE_INPORT) += inport.o 10obj-$(CONFIG_MOUSE_INPORT) += inport.o
10obj-$(CONFIG_MOUSE_LOGIBM) += logibm.o 11obj-$(CONFIG_MOUSE_LOGIBM) += logibm.o
diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c
new file mode 100644
index 000000000000..43ab6566fb65
--- /dev/null
+++ b/drivers/input/mouse/atarimouse.c
@@ -0,0 +1,160 @@
1/*
2 * Atari mouse driver for Linux/m68k
3 *
4 * Copyright (c) 2005 Michael Schmitz
5 *
6 * Based on:
7 * Amiga mouse driver for Linux/m68k
8 *
9 * Copyright (c) 2000-2002 Vojtech Pavlik
10 *
11 */
12/*
13 * The low level init and interrupt stuff is handled in arch/mm68k/atari/atakeyb.c
14 * (the keyboard ACIA also handles the mouse and joystick data, and the keyboard
15 * interrupt is shared with the MIDI ACIA so MIDI data also get handled there).
16 * This driver only deals with handing key events off to the input layer.
17 *
18 * Largely based on the old:
19 *
20 * Atari Mouse Driver for Linux
21 * by Robert de Vries (robert@and.nl) 19Jul93
22 *
23 * 16 Nov 1994 Andreas Schwab
24 * Compatibility with busmouse
25 * Support for three button mouse (shamelessly stolen from MiNT)
26 * third button wired to one of the joystick directions on joystick 1
27 *
28 * 1996/02/11 Andreas Schwab
29 * Module support
30 * Allow multiple open's
31 *
32 * Converted to use new generic busmouse code. 5 Apr 1998
33 * Russell King <rmk@arm.uk.linux.org>
34 */
35
36
37/*
38 * This program is free software; you can redistribute it and/or modify it
39 * under the terms of the GNU General Public License version 2 as published by
40 * the Free Software Foundation
41 */
42
43#include <linux/module.h>
44#include <linux/init.h>
45#include <linux/input.h>
46#include <linux/interrupt.h>
47
48#include <asm/irq.h>
49#include <asm/setup.h>
50#include <asm/system.h>
51#include <asm/uaccess.h>
52#include <asm/atarihw.h>
53#include <asm/atarikb.h>
54#include <asm/atariints.h>
55
56MODULE_AUTHOR("Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>");
57MODULE_DESCRIPTION("Atari mouse driver");
58MODULE_LICENSE("GPL");
59
60static int mouse_threshold[2] = {2,2};
61
62#ifdef __MODULE__
63MODULE_PARM(mouse_threshold, "2i");
64#endif
65#ifdef FIXED_ATARI_JOYSTICK
66extern int atari_mouse_buttons;
67#endif
68static int atamouse_used = 0;
69
70static struct input_dev *atamouse_dev;
71
72static void atamouse_interrupt(char *buf)
73{
74 int buttons, dx, dy;
75
76/* ikbd_mouse_disable(); */
77
78 buttons = (buf[0] & 1) | ((buf[0] & 2) << 1);
79#ifdef FIXED_ATARI_JOYSTICK
80 buttons |= atari_mouse_buttons & 2;
81 atari_mouse_buttons = buttons;
82#endif
83/* ikbd_mouse_rel_pos(); */
84
85 /* only relative events get here */
86 dx = buf[1];
87 dy = -buf[2];
88
89 input_report_rel(atamouse_dev, REL_X, dx);
90 input_report_rel(atamouse_dev, REL_Y, dy);
91
92 input_report_key(atamouse_dev, BTN_LEFT, buttons & 0x1);
93 input_report_key(atamouse_dev, BTN_MIDDLE, buttons & 0x2);
94 input_report_key(atamouse_dev, BTN_RIGHT, buttons & 0x4);
95
96 input_sync(atamouse_dev);
97
98 return;
99}
100
101static int atamouse_open(struct input_dev *dev)
102{
103 if (atamouse_used++)
104 return 0;
105
106#ifdef FIXED_ATARI_JOYSTICK
107 atari_mouse_buttons = 0;
108#endif
109 ikbd_mouse_y0_top();
110 ikbd_mouse_thresh(mouse_threshold[0], mouse_threshold[1]);
111 ikbd_mouse_rel_pos();
112 atari_input_mouse_interrupt_hook = atamouse_interrupt;
113 return 0;
114}
115
116static void atamouse_close(struct input_dev *dev)
117{
118 if (!--atamouse_used) {
119 ikbd_mouse_disable();
120 atari_mouse_interrupt_hook = NULL;
121 }
122}
123
124static int __init atamouse_init(void)
125{
126 if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
127 return -ENODEV;
128
129 if (!(atamouse_dev = input_allocate_device()))
130 return -ENOMEM;
131
132 if (!(atari_keyb_init()))
133 return -ENODEV;
134
135 atamouse_dev->name = "Atari mouse";
136 atamouse_dev->phys = "atamouse/input0";
137 atamouse_dev->id.bustype = BUS_ATARI;
138 atamouse_dev->id.vendor = 0x0001;
139 atamouse_dev->id.product = 0x0002;
140 atamouse_dev->id.version = 0x0100;
141
142 atamouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
143 atamouse_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
144 atamouse_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
145 atamouse_dev->open = atamouse_open;
146 atamouse_dev->close = atamouse_close;
147
148 input_register_device(atamouse_dev);
149
150 printk(KERN_INFO "input: %s at keyboard ACIA\n", atamouse_dev->name);
151 return 0;
152}
153
154static void __exit atamouse_exit(void)
155{
156 input_unregister_device(atamouse_dev);
157}
158
159module_init(atamouse_init);
160module_exit(atamouse_exit);
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 3b8011c56c86..7678e9876550 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -724,7 +724,7 @@ static int mousedev_connect(struct input_handler *handler, struct input_dev *dev
724 } 724 }
725 725
726 /* temporary symlink to keep userspace happy */ 726 /* temporary symlink to keep userspace happy */
727 error = sysfs_create_link(&input_class.subsys.kset.kobj, 727 error = sysfs_create_link(&input_class.subsys.kobj,
728 &cdev->kobj, mousedev->name); 728 &cdev->kobj, mousedev->name);
729 if (error) 729 if (error)
730 goto err_cdev_destroy; 730 goto err_cdev_destroy;
@@ -742,7 +742,7 @@ static int mousedev_connect(struct input_handler *handler, struct input_dev *dev
742 err_unregister_handle: 742 err_unregister_handle:
743 input_unregister_handle(&mousedev->handle); 743 input_unregister_handle(&mousedev->handle);
744 err_remove_link: 744 err_remove_link:
745 sysfs_remove_link(&input_class.subsys.kset.kobj, mousedev->name); 745 sysfs_remove_link(&input_class.subsys.kobj, mousedev->name);
746 err_cdev_destroy: 746 err_cdev_destroy:
747 class_device_destroy(&input_class, devt); 747 class_device_destroy(&input_class, devt);
748 err_free_mousedev: 748 err_free_mousedev:
@@ -758,7 +758,7 @@ static void mousedev_disconnect(struct input_handle *handle)
758 758
759 input_unregister_handle(handle); 759 input_unregister_handle(handle);
760 760
761 sysfs_remove_link(&input_class.subsys.kset.kobj, mousedev->name); 761 sysfs_remove_link(&input_class.subsys.kobj, mousedev->name);
762 class_device_destroy(&input_class, 762 class_device_destroy(&input_class,
763 MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); 763 MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
764 mousedev->exist = 0; 764 mousedev->exist = 0;
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c
index 249087472740..61c15024c2a0 100644
--- a/drivers/input/touchscreen/hp680_ts_input.c
+++ b/drivers/input/touchscreen/hp680_ts_input.c
@@ -21,7 +21,7 @@
21static void do_softint(void *data); 21static void do_softint(void *data);
22 22
23static struct input_dev *hp680_ts_dev; 23static struct input_dev *hp680_ts_dev;
24static DECLARE_WORK(work, do_softint, 0); 24static DECLARE_WORK(work, do_softint);
25 25
26static void do_softint(void *data) 26static void do_softint(void *data)
27{ 27{
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index 8e2d2c924adf..5e5b5c91d75b 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -442,7 +442,7 @@ static int tsdev_connect(struct input_handler *handler, struct input_dev *dev,
442 } 442 }
443 443
444 /* temporary symlink to keep userspace happy */ 444 /* temporary symlink to keep userspace happy */
445 error = sysfs_create_link(&input_class.subsys.kset.kobj, 445 error = sysfs_create_link(&input_class.subsys.kobj,
446 &cdev->kobj, tsdev->name); 446 &cdev->kobj, tsdev->name);
447 if (error) 447 if (error)
448 goto err_cdev_destroy; 448 goto err_cdev_destroy;
@@ -454,7 +454,7 @@ static int tsdev_connect(struct input_handler *handler, struct input_dev *dev,
454 return 0; 454 return 0;
455 455
456 err_remove_link: 456 err_remove_link:
457 sysfs_remove_link(&input_class.subsys.kset.kobj, tsdev->name); 457 sysfs_remove_link(&input_class.subsys.kobj, tsdev->name);
458 err_cdev_destroy: 458 err_cdev_destroy:
459 class_device_destroy(&input_class, devt); 459 class_device_destroy(&input_class, devt);
460 err_free_tsdev: 460 err_free_tsdev:
@@ -470,7 +470,7 @@ static void tsdev_disconnect(struct input_handle *handle)
470 470
471 input_unregister_handle(handle); 471 input_unregister_handle(handle);
472 472
473 sysfs_remove_link(&input_class.subsys.kset.kobj, tsdev->name); 473 sysfs_remove_link(&input_class.subsys.kobj, tsdev->name);
474 class_device_destroy(&input_class, 474 class_device_destroy(&input_class,
475 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); 475 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
476 tsdev->exist = 0; 476 tsdev->exist = 0;