diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/evdev.c | 5 | ||||
-rw-r--r-- | drivers/input/input.c | 2 | ||||
-rw-r--r-- | drivers/input/joydev.c | 5 | ||||
-rw-r--r-- | drivers/input/joystick/maplecontrol.c | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/Kconfig | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/corgikbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/maple_keyb.c | 37 | ||||
-rw-r--r-- | drivers/input/keyboard/sh_keysc.c | 41 | ||||
-rw-r--r-- | drivers/input/keyboard/spitzkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/mouse/gpio_mouse.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/hgpk.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/rpcmouse.c | 2 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 5 | ||||
-rw-r--r-- | drivers/input/serio/rpckbd.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/serio_raw.c | 4 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/corgi_ts.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/migor_ts.c | 23 |
20 files changed, 97 insertions, 52 deletions
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 5f9d860925a1..cd50c00ab20f 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig | |||
@@ -143,7 +143,7 @@ config INPUT_APMPOWER | |||
143 | ---help--- | 143 | ---help--- |
144 | Say Y here if you want suspend key events to trigger a user | 144 | Say Y here if you want suspend key events to trigger a user |
145 | requested suspend through APM. This is useful on embedded | 145 | requested suspend through APM. This is useful on embedded |
146 | systems where such behviour is desired without userspace | 146 | systems where such behaviour is desired without userspace |
147 | interaction. If unsure, say N. | 147 | interaction. If unsure, say N. |
148 | 148 | ||
149 | To compile this driver as a module, choose M here: the | 149 | To compile this driver as a module, choose M here: the |
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index ed8baa0aec3c..7a7a026ba712 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -94,11 +94,8 @@ static void evdev_event(struct input_handle *handle, | |||
94 | static int evdev_fasync(int fd, struct file *file, int on) | 94 | static int evdev_fasync(int fd, struct file *file, int on) |
95 | { | 95 | { |
96 | struct evdev_client *client = file->private_data; | 96 | struct evdev_client *client = file->private_data; |
97 | int retval; | ||
98 | |||
99 | retval = fasync_helper(fd, file, on, &client->fasync); | ||
100 | 97 | ||
101 | return retval < 0 ? retval : 0; | 98 | return fasync_helper(fd, file, on, &client->fasync); |
102 | } | 99 | } |
103 | 100 | ||
104 | static int evdev_flush(struct file *file, fl_owner_t id) | 101 | static int evdev_flush(struct file *file, fl_owner_t id) |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 913392f63f76..d44065d2e662 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -910,8 +910,6 @@ static int __init input_proc_init(void) | |||
910 | if (!proc_bus_input_dir) | 910 | if (!proc_bus_input_dir) |
911 | return -ENOMEM; | 911 | return -ENOMEM; |
912 | 912 | ||
913 | proc_bus_input_dir->owner = THIS_MODULE; | ||
914 | |||
915 | entry = proc_create("devices", 0, proc_bus_input_dir, | 913 | entry = proc_create("devices", 0, proc_bus_input_dir, |
916 | &input_devices_fileops); | 914 | &input_devices_fileops); |
917 | if (!entry) | 915 | if (!entry) |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 6f2366220a50..4224f0112849 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -159,12 +159,9 @@ static void joydev_event(struct input_handle *handle, | |||
159 | 159 | ||
160 | static int joydev_fasync(int fd, struct file *file, int on) | 160 | static int joydev_fasync(int fd, struct file *file, int on) |
161 | { | 161 | { |
162 | int retval; | ||
163 | struct joydev_client *client = file->private_data; | 162 | struct joydev_client *client = file->private_data; |
164 | 163 | ||
165 | retval = fasync_helper(fd, file, on, &client->fasync); | 164 | return fasync_helper(fd, file, on, &client->fasync); |
166 | |||
167 | return retval < 0 ? retval : 0; | ||
168 | } | 165 | } |
169 | 166 | ||
170 | static void joydev_free(struct device *dev) | 167 | static void joydev_free(struct device *dev) |
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index e50047bfe938..77cfde571bd9 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Based on drivers/usb/iforce.c | 3 | * Based on drivers/usb/iforce.c |
4 | * | 4 | * |
5 | * Copyright Yaegashi Takeshi, 2001 | 5 | * Copyright Yaegashi Takeshi, 2001 |
6 | * Adrian McMenamin, 2008 | 6 | * Adrian McMenamin, 2008 - 2009 |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
@@ -29,7 +29,7 @@ static void dc_pad_callback(struct mapleq *mq) | |||
29 | struct maple_device *mapledev = mq->dev; | 29 | struct maple_device *mapledev = mq->dev; |
30 | struct dc_pad *pad = maple_get_drvdata(mapledev); | 30 | struct dc_pad *pad = maple_get_drvdata(mapledev); |
31 | struct input_dev *dev = pad->dev; | 31 | struct input_dev *dev = pad->dev; |
32 | unsigned char *res = mq->recvbuf; | 32 | unsigned char *res = mq->recvbuf->buf; |
33 | 33 | ||
34 | buttons = ~le16_to_cpup((__le16 *)(res + 8)); | 34 | buttons = ~le16_to_cpup((__le16 *)(res + 8)); |
35 | 35 | ||
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 35561689ff38..ea2638b41982 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -13,11 +13,11 @@ menuconfig INPUT_KEYBOARD | |||
13 | if INPUT_KEYBOARD | 13 | if INPUT_KEYBOARD |
14 | 14 | ||
15 | config KEYBOARD_ATKBD | 15 | config KEYBOARD_ATKBD |
16 | tristate "AT keyboard" if EMBEDDED || !X86_PC | 16 | tristate "AT keyboard" if EMBEDDED || !X86 |
17 | default y | 17 | default y |
18 | select SERIO | 18 | select SERIO |
19 | select SERIO_LIBPS2 | 19 | select SERIO_LIBPS2 |
20 | select SERIO_I8042 if X86_PC | 20 | select SERIO_I8042 if X86 |
21 | select SERIO_GSCPS2 if GSC | 21 | select SERIO_GSCPS2 if GSC |
22 | help | 22 | help |
23 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually | 23 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index abb04c82c622..634af6a8e6b3 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | 22 | ||
23 | #include <mach/corgi.h> | 23 | #include <mach/corgi.h> |
24 | #include <mach/hardware.h> | ||
25 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/pxa2xx-gpio.h> | 24 | #include <mach/pxa2xx-gpio.h> |
27 | #include <asm/hardware/scoop.h> | 25 | #include <asm/hardware/scoop.h> |
28 | 26 | ||
diff --git a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c index 22f17a593be7..5aa2361aef95 100644 --- a/drivers/input/keyboard/maple_keyb.c +++ b/drivers/input/keyboard/maple_keyb.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * SEGA Dreamcast keyboard driver | 2 | * SEGA Dreamcast keyboard driver |
3 | * Based on drivers/usb/usbkbd.c | 3 | * Based on drivers/usb/usbkbd.c |
4 | * Copyright YAEGASHI Takeshi, 2001 | 4 | * Copyright (c) YAEGASHI Takeshi, 2001 |
5 | * Porting to 2.6 Copyright Adrian McMenamin, 2007, 2008 | 5 | * Porting to 2.6 Copyright (c) Adrian McMenamin, 2007 - 2009 |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -33,7 +33,7 @@ static DEFINE_MUTEX(maple_keyb_mutex); | |||
33 | 33 | ||
34 | #define NR_SCANCODES 256 | 34 | #define NR_SCANCODES 256 |
35 | 35 | ||
36 | MODULE_AUTHOR("YAEGASHI Takeshi, Adrian McMenamin"); | 36 | MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk"); |
37 | MODULE_DESCRIPTION("SEGA Dreamcast keyboard driver"); | 37 | MODULE_DESCRIPTION("SEGA Dreamcast keyboard driver"); |
38 | MODULE_LICENSE("GPL"); | 38 | MODULE_LICENSE("GPL"); |
39 | 39 | ||
@@ -115,7 +115,7 @@ static void dc_scan_kbd(struct dc_kbd *kbd) | |||
115 | input_event(dev, EV_MSC, MSC_SCAN, code); | 115 | input_event(dev, EV_MSC, MSC_SCAN, code); |
116 | input_report_key(dev, keycode, 0); | 116 | input_report_key(dev, keycode, 0); |
117 | } else | 117 | } else |
118 | printk(KERN_DEBUG "maple_keyb: " | 118 | dev_dbg(&dev->dev, |
119 | "Unknown key (scancode %#x) released.", | 119 | "Unknown key (scancode %#x) released.", |
120 | code); | 120 | code); |
121 | } | 121 | } |
@@ -127,7 +127,7 @@ static void dc_scan_kbd(struct dc_kbd *kbd) | |||
127 | input_event(dev, EV_MSC, MSC_SCAN, code); | 127 | input_event(dev, EV_MSC, MSC_SCAN, code); |
128 | input_report_key(dev, keycode, 1); | 128 | input_report_key(dev, keycode, 1); |
129 | } else | 129 | } else |
130 | printk(KERN_DEBUG "maple_keyb: " | 130 | dev_dbg(&dev->dev, |
131 | "Unknown key (scancode %#x) pressed.", | 131 | "Unknown key (scancode %#x) pressed.", |
132 | code); | 132 | code); |
133 | } | 133 | } |
@@ -140,7 +140,7 @@ static void dc_kbd_callback(struct mapleq *mq) | |||
140 | { | 140 | { |
141 | struct maple_device *mapledev = mq->dev; | 141 | struct maple_device *mapledev = mq->dev; |
142 | struct dc_kbd *kbd = maple_get_drvdata(mapledev); | 142 | struct dc_kbd *kbd = maple_get_drvdata(mapledev); |
143 | unsigned long *buf = mq->recvbuf; | 143 | unsigned long *buf = (unsigned long *)(mq->recvbuf->buf); |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * We should always get the lock because the only | 146 | * We should always get the lock because the only |
@@ -159,22 +159,27 @@ static void dc_kbd_callback(struct mapleq *mq) | |||
159 | 159 | ||
160 | static int probe_maple_kbd(struct device *dev) | 160 | static int probe_maple_kbd(struct device *dev) |
161 | { | 161 | { |
162 | struct maple_device *mdev = to_maple_dev(dev); | 162 | struct maple_device *mdev; |
163 | struct maple_driver *mdrv = to_maple_driver(dev->driver); | 163 | struct maple_driver *mdrv; |
164 | int i, error; | 164 | int i, error; |
165 | struct dc_kbd *kbd; | 165 | struct dc_kbd *kbd; |
166 | struct input_dev *idev; | 166 | struct input_dev *idev; |
167 | 167 | ||
168 | if (!(mdev->function & MAPLE_FUNC_KEYBOARD)) | 168 | mdev = to_maple_dev(dev); |
169 | return -EINVAL; | 169 | mdrv = to_maple_driver(dev->driver); |
170 | 170 | ||
171 | kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL); | 171 | kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL); |
172 | idev = input_allocate_device(); | 172 | if (!kbd) { |
173 | if (!kbd || !idev) { | ||
174 | error = -ENOMEM; | 173 | error = -ENOMEM; |
175 | goto fail; | 174 | goto fail; |
176 | } | 175 | } |
177 | 176 | ||
177 | idev = input_allocate_device(); | ||
178 | if (!idev) { | ||
179 | error = -ENOMEM; | ||
180 | goto fail_idev_alloc; | ||
181 | } | ||
182 | |||
178 | kbd->dev = idev; | 183 | kbd->dev = idev; |
179 | memcpy(kbd->keycode, dc_kbd_keycode, sizeof(kbd->keycode)); | 184 | memcpy(kbd->keycode, dc_kbd_keycode, sizeof(kbd->keycode)); |
180 | 185 | ||
@@ -195,7 +200,7 @@ static int probe_maple_kbd(struct device *dev) | |||
195 | 200 | ||
196 | error = input_register_device(idev); | 201 | error = input_register_device(idev); |
197 | if (error) | 202 | if (error) |
198 | goto fail; | 203 | goto fail_register; |
199 | 204 | ||
200 | /* Maple polling is locked to VBLANK - which may be just 50/s */ | 205 | /* Maple polling is locked to VBLANK - which may be just 50/s */ |
201 | maple_getcond_callback(mdev, dc_kbd_callback, HZ/50, | 206 | maple_getcond_callback(mdev, dc_kbd_callback, HZ/50, |
@@ -207,10 +212,12 @@ static int probe_maple_kbd(struct device *dev) | |||
207 | 212 | ||
208 | return error; | 213 | return error; |
209 | 214 | ||
210 | fail: | 215 | fail_register: |
216 | maple_set_drvdata(mdev, NULL); | ||
211 | input_free_device(idev); | 217 | input_free_device(idev); |
218 | fail_idev_alloc: | ||
212 | kfree(kbd); | 219 | kfree(kbd); |
213 | maple_set_drvdata(mdev, NULL); | 220 | fail: |
214 | return error; | 221 | return error; |
215 | } | 222 | } |
216 | 223 | ||
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 5c8a1bcf7ca7..cea70e6a1031 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c | |||
@@ -219,6 +219,8 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev) | |||
219 | pdata->scan_timing, priv->iomem_base + KYCR1_OFFS); | 219 | pdata->scan_timing, priv->iomem_base + KYCR1_OFFS); |
220 | iowrite16(0, priv->iomem_base + KYOUTDR_OFFS); | 220 | iowrite16(0, priv->iomem_base + KYOUTDR_OFFS); |
221 | iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS); | 221 | iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS); |
222 | |||
223 | device_init_wakeup(&pdev->dev, 1); | ||
222 | return 0; | 224 | return 0; |
223 | err5: | 225 | err5: |
224 | free_irq(irq, pdev); | 226 | free_irq(irq, pdev); |
@@ -253,17 +255,48 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev) | |||
253 | return 0; | 255 | return 0; |
254 | } | 256 | } |
255 | 257 | ||
258 | static int sh_keysc_suspend(struct device *dev) | ||
259 | { | ||
260 | struct platform_device *pdev = to_platform_device(dev); | ||
261 | struct sh_keysc_priv *priv = platform_get_drvdata(pdev); | ||
262 | int irq = platform_get_irq(pdev, 0); | ||
263 | unsigned short value; | ||
264 | |||
265 | value = ioread16(priv->iomem_base + KYCR1_OFFS); | ||
266 | |||
267 | if (device_may_wakeup(dev)) { | ||
268 | value |= 0x80; | ||
269 | enable_irq_wake(irq); | ||
270 | } | ||
271 | else | ||
272 | value &= ~0x80; | ||
273 | |||
274 | iowrite16(value, priv->iomem_base + KYCR1_OFFS); | ||
275 | return 0; | ||
276 | } | ||
277 | |||
278 | static int sh_keysc_resume(struct device *dev) | ||
279 | { | ||
280 | struct platform_device *pdev = to_platform_device(dev); | ||
281 | int irq = platform_get_irq(pdev, 0); | ||
282 | |||
283 | if (device_may_wakeup(dev)) | ||
284 | disable_irq_wake(irq); | ||
256 | 285 | ||
257 | #define sh_keysc_suspend NULL | 286 | return 0; |
258 | #define sh_keysc_resume NULL | 287 | } |
288 | |||
289 | static struct dev_pm_ops sh_keysc_dev_pm_ops = { | ||
290 | .suspend = sh_keysc_suspend, | ||
291 | .resume = sh_keysc_resume, | ||
292 | }; | ||
259 | 293 | ||
260 | struct platform_driver sh_keysc_device_driver = { | 294 | struct platform_driver sh_keysc_device_driver = { |
261 | .probe = sh_keysc_probe, | 295 | .probe = sh_keysc_probe, |
262 | .remove = __devexit_p(sh_keysc_remove), | 296 | .remove = __devexit_p(sh_keysc_remove), |
263 | .suspend = sh_keysc_suspend, | ||
264 | .resume = sh_keysc_resume, | ||
265 | .driver = { | 297 | .driver = { |
266 | .name = "sh_keysc", | 298 | .name = "sh_keysc", |
299 | .pm = &sh_keysc_dev_pm_ops, | ||
267 | } | 300 | } |
268 | }; | 301 | }; |
269 | 302 | ||
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 9d1781a618e9..13967422658c 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | 22 | ||
23 | #include <mach/spitz.h> | 23 | #include <mach/spitz.h> |
24 | #include <mach/hardware.h> | ||
25 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/pxa2xx-gpio.h> | 24 | #include <mach/pxa2xx-gpio.h> |
27 | 25 | ||
28 | #define KB_ROWS 7 | 26 | #define KB_ROWS 7 |
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index 2a92e19c1509..c66cc3d08c2f 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig | |||
@@ -17,7 +17,7 @@ config MOUSE_PS2 | |||
17 | default y | 17 | default y |
18 | select SERIO | 18 | select SERIO |
19 | select SERIO_LIBPS2 | 19 | select SERIO_LIBPS2 |
20 | select SERIO_I8042 if X86_PC | 20 | select SERIO_I8042 if X86 |
21 | select SERIO_GSCPS2 if GSC | 21 | select SERIO_GSCPS2 if GSC |
22 | help | 22 | help |
23 | Say Y here if you have a PS/2 mouse connected to your system. This | 23 | Say Y here if you have a PS/2 mouse connected to your system. This |
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 0db8d16c5edd..5e5eb88d8d1e 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Timer function which is run every scan_ms ms when the device is opened. | 20 | * Timer function which is run every scan_ms ms when the device is opened. |
21 | * The dev input varaible is set to the the input_dev pointer. | 21 | * The dev input variable is set to the the input_dev pointer. |
22 | */ | 22 | */ |
23 | static void gpio_mouse_scan(struct input_polled_dev *dev) | 23 | static void gpio_mouse_scan(struct input_polled_dev *dev) |
24 | { | 24 | { |
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c index a14a6b0f7af0..a1ad2f1a7bb3 100644 --- a/drivers/input/mouse/hgpk.c +++ b/drivers/input/mouse/hgpk.c | |||
@@ -381,7 +381,7 @@ static void hgpk_disconnect(struct psmouse *psmouse) | |||
381 | 381 | ||
382 | static void hgpk_recalib_work(struct work_struct *work) | 382 | static void hgpk_recalib_work(struct work_struct *work) |
383 | { | 383 | { |
384 | struct delayed_work *w = container_of(work, struct delayed_work, work); | 384 | struct delayed_work *w = to_delayed_work(work); |
385 | struct hgpk_data *priv = container_of(w, struct hgpk_data, recalib_wq); | 385 | struct hgpk_data *priv = container_of(w, struct hgpk_data, recalib_wq); |
386 | struct psmouse *psmouse = priv->psmouse; | 386 | struct psmouse *psmouse = priv->psmouse; |
387 | 387 | ||
diff --git a/drivers/input/mouse/rpcmouse.c b/drivers/input/mouse/rpcmouse.c index 56c079ef5018..272deddc8db6 100644 --- a/drivers/input/mouse/rpcmouse.c +++ b/drivers/input/mouse/rpcmouse.c | |||
@@ -22,10 +22,10 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/io.h> | ||
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | #include <asm/io.h> | ||
29 | #include <asm/hardware/iomd.h> | 29 | #include <asm/hardware/iomd.h> |
30 | 30 | ||
31 | MODULE_AUTHOR("Vojtech Pavlik, Russell King"); | 31 | MODULE_AUTHOR("Vojtech Pavlik, Russell King"); |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index ef99a7e6d40c..17fd6d46d082 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -403,12 +403,9 @@ static void mousedev_event(struct input_handle *handle, | |||
403 | 403 | ||
404 | static int mousedev_fasync(int fd, struct file *file, int on) | 404 | static int mousedev_fasync(int fd, struct file *file, int on) |
405 | { | 405 | { |
406 | int retval; | ||
407 | struct mousedev_client *client = file->private_data; | 406 | struct mousedev_client *client = file->private_data; |
408 | 407 | ||
409 | retval = fasync_helper(fd, file, on, &client->fasync); | 408 | return fasync_helper(fd, file, on, &client->fasync); |
410 | |||
411 | return retval < 0 ? retval : 0; | ||
412 | } | 409 | } |
413 | 410 | ||
414 | static void mousedev_free(struct device *dev) | 411 | static void mousedev_free(struct device *dev) |
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index 7f36edd34f8b..ed045c99f84b 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c | |||
@@ -33,10 +33,10 @@ | |||
33 | #include <linux/serio.h> | 33 | #include <linux/serio.h> |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/io.h> | ||
36 | 37 | ||
37 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
38 | #include <mach/hardware.h> | 39 | #include <mach/hardware.h> |
39 | #include <asm/io.h> | ||
40 | #include <asm/hardware/iomd.h> | 40 | #include <asm/hardware/iomd.h> |
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | 42 | ||
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 06bbd0e74c6f..b03009bb7468 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
@@ -58,10 +58,8 @@ static unsigned int serio_raw_no; | |||
58 | static int serio_raw_fasync(int fd, struct file *file, int on) | 58 | static int serio_raw_fasync(int fd, struct file *file, int on) |
59 | { | 59 | { |
60 | struct serio_raw_list *list = file->private_data; | 60 | struct serio_raw_list *list = file->private_data; |
61 | int retval; | ||
62 | 61 | ||
63 | retval = fasync_helper(fd, file, on, &list->fasync); | 62 | return fasync_helper(fd, file, on, &list->fasync); |
64 | return retval < 0 ? retval : 0; | ||
65 | } | 63 | } |
66 | 64 | ||
67 | static struct serio_raw *serio_raw_locate(int minor) | 65 | static struct serio_raw *serio_raw_locate(int minor) |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 7c27c8b9b6d0..056ac77e2cf0 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -295,7 +295,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ | |||
295 | static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); | 295 | static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); |
296 | 296 | ||
297 | 297 | ||
298 | /* Sysfs conventions report temperatures in millidegrees Celcius. | 298 | /* Sysfs conventions report temperatures in millidegrees Celsius. |
299 | * ADS7846 could use the low-accuracy two-sample scheme, but can't do the high | 299 | * ADS7846 could use the low-accuracy two-sample scheme, but can't do the high |
300 | * accuracy scheme without calibration data. For now we won't try either; | 300 | * accuracy scheme without calibration data. For now we won't try either; |
301 | * userspace sees raw sensor values, and must scale/calibrate appropriately. | 301 | * userspace sees raw sensor values, and must scale/calibrate appropriately. |
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index 3fb51b54fe61..94a1919d439d 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <mach/sharpsl.h> | 22 | #include <mach/sharpsl.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/pxa-regs.h> | ||
25 | #include <mach/pxa2xx-gpio.h> | 24 | #include <mach/pxa2xx-gpio.h> |
26 | 25 | ||
27 | 26 | ||
diff --git a/drivers/input/touchscreen/migor_ts.c b/drivers/input/touchscreen/migor_ts.c index 504ca11749a1..141dd584330e 100644 --- a/drivers/input/touchscreen/migor_ts.c +++ b/drivers/input/touchscreen/migor_ts.c | |||
@@ -198,6 +198,7 @@ static int migor_ts_probe(struct i2c_client *client, | |||
198 | goto err2; | 198 | goto err2; |
199 | } | 199 | } |
200 | 200 | ||
201 | device_init_wakeup(&client->dev, 1); | ||
201 | return 0; | 202 | return 0; |
202 | 203 | ||
203 | err2: | 204 | err2: |
@@ -224,6 +225,26 @@ static int migor_ts_remove(struct i2c_client *client) | |||
224 | return 0; | 225 | return 0; |
225 | } | 226 | } |
226 | 227 | ||
228 | static int migor_ts_suspend(struct i2c_client *client, pm_message_t mesg) | ||
229 | { | ||
230 | struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); | ||
231 | |||
232 | if (device_may_wakeup(&client->dev)) | ||
233 | enable_irq_wake(priv->irq); | ||
234 | |||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | static int migor_ts_resume(struct i2c_client *client) | ||
239 | { | ||
240 | struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); | ||
241 | |||
242 | if (device_may_wakeup(&client->dev)) | ||
243 | disable_irq_wake(priv->irq); | ||
244 | |||
245 | return 0; | ||
246 | } | ||
247 | |||
227 | static const struct i2c_device_id migor_ts_id[] = { | 248 | static const struct i2c_device_id migor_ts_id[] = { |
228 | { "migor_ts", 0 }, | 249 | { "migor_ts", 0 }, |
229 | { } | 250 | { } |
@@ -236,6 +257,8 @@ static struct i2c_driver migor_ts_driver = { | |||
236 | }, | 257 | }, |
237 | .probe = migor_ts_probe, | 258 | .probe = migor_ts_probe, |
238 | .remove = migor_ts_remove, | 259 | .remove = migor_ts_remove, |
260 | .suspend = migor_ts_suspend, | ||
261 | .resume = migor_ts_resume, | ||
239 | .id_table = migor_ts_id, | 262 | .id_table = migor_ts_id, |
240 | }; | 263 | }; |
241 | 264 | ||