diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2007-10-12 21:27:47 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2007-10-12 21:27:47 -0400 |
commit | b981d8b3f5e008ff10d993be633ad00564fc22cd (patch) | |
tree | e292dc07b22308912cf6a58354a608b9e5e8e1fd /drivers/input | |
parent | b11d2127c4893a7315d1e16273bc8560049fa3ca (diff) | |
parent | 2b9e0aae1d50e880c58d46788e5e3ebd89d75d62 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/macintosh/adbhid.c
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 2 | ||||
-rw-r--r-- | drivers/input/input.c | 62 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 8 | ||||
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/Kconfig | 1 | ||||
-rw-r--r-- | drivers/input/misc/atlas_btns.c | 9 | ||||
-rw-r--r-- | drivers/input/misc/pcspkr.c | 14 | ||||
-rw-r--r-- | drivers/input/misc/wistron_btns.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/appletouch.c | 113 | ||||
-rw-r--r-- | drivers/input/mouse/lifebook.c | 8 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/touchkit_ps2.h | 3 | ||||
-rw-r--r-- | drivers/input/serio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/serio/ambakmi.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/gscps2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 10 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/pcips2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/sa1111ps2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 11 | ||||
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 2 |
21 files changed, 154 insertions, 126 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index d404aa8680ea..27026f7d3c03 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -312,7 +312,7 @@ struct input_event_compat { | |||
312 | #elif defined(CONFIG_S390) | 312 | #elif defined(CONFIG_S390) |
313 | # define COMPAT_TEST test_thread_flag(TIF_31BIT) | 313 | # define COMPAT_TEST test_thread_flag(TIF_31BIT) |
314 | #elif defined(CONFIG_MIPS) | 314 | #elif defined(CONFIG_MIPS) |
315 | # define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR) | 315 | # define COMPAT_TEST test_thread_flag(TIF_32BIT_ADDR) |
316 | #else | 316 | #else |
317 | # define COMPAT_TEST test_thread_flag(TIF_32BIT) | 317 | # define COMPAT_TEST test_thread_flag(TIF_32BIT) |
318 | #endif | 318 | #endif |
diff --git a/drivers/input/input.c b/drivers/input/input.c index c59544f7e232..3070c7aa1237 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1067,87 +1067,66 @@ static void input_dev_release(struct device *device) | |||
1067 | * Input uevent interface - loading event handlers based on | 1067 | * Input uevent interface - loading event handlers based on |
1068 | * device bitfields. | 1068 | * device bitfields. |
1069 | */ | 1069 | */ |
1070 | static int input_add_uevent_bm_var(char **envp, int num_envp, int *cur_index, | 1070 | static int input_add_uevent_bm_var(struct kobj_uevent_env *env, |
1071 | char *buffer, int buffer_size, int *cur_len, | ||
1072 | const char *name, unsigned long *bitmap, int max) | 1071 | const char *name, unsigned long *bitmap, int max) |
1073 | { | 1072 | { |
1074 | if (*cur_index >= num_envp - 1) | 1073 | int len; |
1075 | return -ENOMEM; | ||
1076 | |||
1077 | envp[*cur_index] = buffer + *cur_len; | ||
1078 | 1074 | ||
1079 | *cur_len += snprintf(buffer + *cur_len, max(buffer_size - *cur_len, 0), name); | 1075 | if (add_uevent_var(env, "%s=", name)) |
1080 | if (*cur_len >= buffer_size) | ||
1081 | return -ENOMEM; | 1076 | return -ENOMEM; |
1082 | 1077 | ||
1083 | *cur_len += input_print_bitmap(buffer + *cur_len, | 1078 | len = input_print_bitmap(&env->buf[env->buflen - 1], |
1084 | max(buffer_size - *cur_len, 0), | 1079 | sizeof(env->buf) - env->buflen, |
1085 | bitmap, max, 0) + 1; | 1080 | bitmap, max, 0); |
1086 | if (*cur_len > buffer_size) | 1081 | if (len >= (sizeof(env->buf) - env->buflen)) |
1087 | return -ENOMEM; | 1082 | return -ENOMEM; |
1088 | 1083 | ||
1089 | (*cur_index)++; | 1084 | env->buflen += len; |
1090 | return 0; | 1085 | return 0; |
1091 | } | 1086 | } |
1092 | 1087 | ||
1093 | static int input_add_uevent_modalias_var(char **envp, int num_envp, int *cur_index, | 1088 | static int input_add_uevent_modalias_var(struct kobj_uevent_env *env, |
1094 | char *buffer, int buffer_size, int *cur_len, | ||
1095 | struct input_dev *dev) | 1089 | struct input_dev *dev) |
1096 | { | 1090 | { |
1097 | if (*cur_index >= num_envp - 1) | 1091 | int len; |
1098 | return -ENOMEM; | ||
1099 | |||
1100 | envp[*cur_index] = buffer + *cur_len; | ||
1101 | 1092 | ||
1102 | *cur_len += snprintf(buffer + *cur_len, max(buffer_size - *cur_len, 0), | 1093 | if (add_uevent_var(env, "MODALIAS=")) |
1103 | "MODALIAS="); | ||
1104 | if (*cur_len >= buffer_size) | ||
1105 | return -ENOMEM; | 1094 | return -ENOMEM; |
1106 | 1095 | ||
1107 | *cur_len += input_print_modalias(buffer + *cur_len, | 1096 | len = input_print_modalias(&env->buf[env->buflen - 1], |
1108 | max(buffer_size - *cur_len, 0), | 1097 | sizeof(env->buf) - env->buflen, |
1109 | dev, 0) + 1; | 1098 | dev, 0); |
1110 | if (*cur_len > buffer_size) | 1099 | if (len >= (sizeof(env->buf) - env->buflen)) |
1111 | return -ENOMEM; | 1100 | return -ENOMEM; |
1112 | 1101 | ||
1113 | (*cur_index)++; | 1102 | env->buflen += len; |
1114 | return 0; | 1103 | return 0; |
1115 | } | 1104 | } |
1116 | 1105 | ||
1117 | #define INPUT_ADD_HOTPLUG_VAR(fmt, val...) \ | 1106 | #define INPUT_ADD_HOTPLUG_VAR(fmt, val...) \ |
1118 | do { \ | 1107 | do { \ |
1119 | int err = add_uevent_var(envp, num_envp, &i, \ | 1108 | int err = add_uevent_var(env, fmt, val); \ |
1120 | buffer, buffer_size, &len, \ | ||
1121 | fmt, val); \ | ||
1122 | if (err) \ | 1109 | if (err) \ |
1123 | return err; \ | 1110 | return err; \ |
1124 | } while (0) | 1111 | } while (0) |
1125 | 1112 | ||
1126 | #define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ | 1113 | #define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ |
1127 | do { \ | 1114 | do { \ |
1128 | int err = input_add_uevent_bm_var(envp, num_envp, &i, \ | 1115 | int err = input_add_uevent_bm_var(env, name, bm, max); \ |
1129 | buffer, buffer_size, &len, \ | ||
1130 | name, bm, max); \ | ||
1131 | if (err) \ | 1116 | if (err) \ |
1132 | return err; \ | 1117 | return err; \ |
1133 | } while (0) | 1118 | } while (0) |
1134 | 1119 | ||
1135 | #define INPUT_ADD_HOTPLUG_MODALIAS_VAR(dev) \ | 1120 | #define INPUT_ADD_HOTPLUG_MODALIAS_VAR(dev) \ |
1136 | do { \ | 1121 | do { \ |
1137 | int err = input_add_uevent_modalias_var(envp, \ | 1122 | int err = input_add_uevent_modalias_var(env, dev); \ |
1138 | num_envp, &i, \ | ||
1139 | buffer, buffer_size, &len, \ | ||
1140 | dev); \ | ||
1141 | if (err) \ | 1123 | if (err) \ |
1142 | return err; \ | 1124 | return err; \ |
1143 | } while (0) | 1125 | } while (0) |
1144 | 1126 | ||
1145 | static int input_dev_uevent(struct device *device, char **envp, | 1127 | static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env) |
1146 | int num_envp, char *buffer, int buffer_size) | ||
1147 | { | 1128 | { |
1148 | struct input_dev *dev = to_input_dev(device); | 1129 | struct input_dev *dev = to_input_dev(device); |
1149 | int i = 0; | ||
1150 | int len = 0; | ||
1151 | 1130 | ||
1152 | INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x", | 1131 | INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x", |
1153 | dev->id.bustype, dev->id.vendor, | 1132 | dev->id.bustype, dev->id.vendor, |
@@ -1179,7 +1158,6 @@ static int input_dev_uevent(struct device *device, char **envp, | |||
1179 | 1158 | ||
1180 | INPUT_ADD_HOTPLUG_MODALIAS_VAR(dev); | 1159 | INPUT_ADD_HOTPLUG_MODALIAS_VAR(dev); |
1181 | 1160 | ||
1182 | envp[i] = NULL; | ||
1183 | return 0; | 1161 | return 0; |
1184 | } | 1162 | } |
1185 | 1163 | ||
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 3154ccd74000..45c4939ced75 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c | |||
@@ -246,13 +246,12 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) | |||
246 | 246 | ||
247 | int iforce_get_id_packet(struct iforce *iforce, char *packet) | 247 | int iforce_get_id_packet(struct iforce *iforce, char *packet) |
248 | { | 248 | { |
249 | int status; | ||
250 | |||
251 | switch (iforce->bus) { | 249 | switch (iforce->bus) { |
252 | 250 | ||
253 | case IFORCE_USB: | 251 | case IFORCE_USB: { |
254 | |||
255 | #ifdef CONFIG_JOYSTICK_IFORCE_USB | 252 | #ifdef CONFIG_JOYSTICK_IFORCE_USB |
253 | int status; | ||
254 | |||
256 | iforce->cr.bRequest = packet[0]; | 255 | iforce->cr.bRequest = packet[0]; |
257 | iforce->ctrl->dev = iforce->usbdev; | 256 | iforce->ctrl->dev = iforce->usbdev; |
258 | 257 | ||
@@ -273,6 +272,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
273 | #else | 272 | #else |
274 | dbg("iforce_get_id_packet: iforce->bus = USB!"); | 273 | dbg("iforce_get_id_packet: iforce->bus = USB!"); |
275 | #endif | 274 | #endif |
275 | } | ||
276 | break; | 276 | break; |
277 | 277 | ||
278 | case IFORCE_232: | 278 | case IFORCE_232: |
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 3d6820b4465b..e2a3293bc67e 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/irq.h> | ||
26 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
27 | 26 | ||
28 | #include <asm/gpio.h> | 27 | #include <asm/gpio.h> |
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 9b26574f1466..d602b8fa7d46 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -68,6 +68,7 @@ config INPUT_WISTRON_BTNS | |||
68 | select INPUT_POLLDEV | 68 | select INPUT_POLLDEV |
69 | select NEW_LEDS | 69 | select NEW_LEDS |
70 | select LEDS_CLASS | 70 | select LEDS_CLASS |
71 | select CHECK_SIGNATURE | ||
71 | help | 72 | help |
72 | Say Y here for support of Winstron laptop button interface, used on | 73 | Say Y here for support of Winstron laptop button interface, used on |
73 | laptops of various brands, including Acer and Fujitsu-Siemens. If | 74 | laptops of various brands, including Acer and Fujitsu-Siemens. If |
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c index 0acc3a123604..e43e92fd9e23 100644 --- a/drivers/input/misc/atlas_btns.c +++ b/drivers/input/misc/atlas_btns.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #define ACPI_ATLAS_NAME "Atlas ACPI" | 32 | #define ACPI_ATLAS_NAME "Atlas ACPI" |
33 | #define ACPI_ATLAS_CLASS "Atlas" | 33 | #define ACPI_ATLAS_CLASS "Atlas" |
34 | #define ACPI_ATLAS_BUTTON_HID "ASIM0000" | ||
35 | 34 | ||
36 | static struct input_dev *input_dev; | 35 | static struct input_dev *input_dev; |
37 | 36 | ||
@@ -130,10 +129,16 @@ static int atlas_acpi_button_remove(struct acpi_device *device, int type) | |||
130 | return status; | 129 | return status; |
131 | } | 130 | } |
132 | 131 | ||
132 | static const struct acpi_device_id atlas_device_ids[] = { | ||
133 | {"ASIM0000", 0}, | ||
134 | {"", 0}, | ||
135 | }; | ||
136 | MODULE_DEVICE_TABLE(acpi, atlas_device_ids); | ||
137 | |||
133 | static struct acpi_driver atlas_acpi_driver = { | 138 | static struct acpi_driver atlas_acpi_driver = { |
134 | .name = ACPI_ATLAS_NAME, | 139 | .name = ACPI_ATLAS_NAME, |
135 | .class = ACPI_ATLAS_CLASS, | 140 | .class = ACPI_ATLAS_CLASS, |
136 | .ids = ACPI_ATLAS_BUTTON_HID, | 141 | .ids = atlas_device_ids, |
137 | .ops = { | 142 | .ops = { |
138 | .add = atlas_acpi_button_add, | 143 | .add = atlas_acpi_button_add, |
139 | .remove = atlas_acpi_button_remove, | 144 | .remove = atlas_acpi_button_remove, |
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index 31989dcd922c..c19f77fbaf2a 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c | |||
@@ -17,14 +17,20 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <asm/8253pit.h> | ||
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
22 | 21 | ||
23 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); | 22 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); |
24 | MODULE_DESCRIPTION("PC Speaker beeper driver"); | 23 | MODULE_DESCRIPTION("PC Speaker beeper driver"); |
25 | MODULE_LICENSE("GPL"); | 24 | MODULE_LICENSE("GPL"); |
25 | MODULE_ALIAS("platform:pcspkr"); | ||
26 | 26 | ||
27 | static DEFINE_SPINLOCK(i8253_beep_lock); | 27 | #ifdef CONFIG_X86 |
28 | /* Use the global PIT lock ! */ | ||
29 | #include <asm/i8253.h> | ||
30 | #else | ||
31 | #include <asm/8253pit.h> | ||
32 | static DEFINE_SPINLOCK(i8253_lock); | ||
33 | #endif | ||
28 | 34 | ||
29 | static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) | 35 | static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) |
30 | { | 36 | { |
@@ -43,7 +49,7 @@ static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int c | |||
43 | if (value > 20 && value < 32767) | 49 | if (value > 20 && value < 32767) |
44 | count = PIT_TICK_RATE / value; | 50 | count = PIT_TICK_RATE / value; |
45 | 51 | ||
46 | spin_lock_irqsave(&i8253_beep_lock, flags); | 52 | spin_lock_irqsave(&i8253_lock, flags); |
47 | 53 | ||
48 | if (count) { | 54 | if (count) { |
49 | /* enable counter 2 */ | 55 | /* enable counter 2 */ |
@@ -58,7 +64,7 @@ static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int c | |||
58 | outb(inb_p(0x61) & 0xFC, 0x61); | 64 | outb(inb_p(0x61) & 0xFC, 0x61); |
59 | } | 65 | } |
60 | 66 | ||
61 | spin_unlock_irqrestore(&i8253_beep_lock, flags); | 67 | spin_unlock_irqrestore(&i8253_lock, flags); |
62 | 68 | ||
63 | return 0; | 69 | return 0; |
64 | } | 70 | } |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 60121f10f8d9..b438d998625c 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -247,7 +247,7 @@ static int have_wifi; | |||
247 | static int have_bluetooth; | 247 | static int have_bluetooth; |
248 | static int have_leds; | 248 | static int have_leds; |
249 | 249 | ||
250 | static int __init dmi_matched(struct dmi_system_id *dmi) | 250 | static int __init dmi_matched(const struct dmi_system_id *dmi) |
251 | { | 251 | { |
252 | const struct key_entry *key; | 252 | const struct key_entry *key; |
253 | 253 | ||
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index e3215267db11..a1804bfdbb8c 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -155,6 +155,8 @@ struct atp { | |||
155 | int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; | 155 | int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; |
156 | int overflowwarn; /* overflow warning printed? */ | 156 | int overflowwarn; /* overflow warning printed? */ |
157 | int datalen; /* size of an USB urb transfer */ | 157 | int datalen; /* size of an USB urb transfer */ |
158 | int idlecount; /* number of empty packets */ | ||
159 | struct work_struct work; | ||
158 | }; | 160 | }; |
159 | 161 | ||
160 | #define dbg_dump(msg, tab) \ | 162 | #define dbg_dump(msg, tab) \ |
@@ -208,6 +210,55 @@ static inline int atp_is_geyser_3(struct atp *dev) | |||
208 | (productId == GEYSER4_JIS_PRODUCT_ID); | 210 | (productId == GEYSER4_JIS_PRODUCT_ID); |
209 | } | 211 | } |
210 | 212 | ||
213 | /* | ||
214 | * By default Geyser 3 device sends standard USB HID mouse | ||
215 | * packets (Report ID 2). This code changes device mode, so it | ||
216 | * sends raw sensor reports (Report ID 5). | ||
217 | */ | ||
218 | static int atp_geyser3_init(struct usb_device *udev) | ||
219 | { | ||
220 | char data[8]; | ||
221 | int size; | ||
222 | |||
223 | size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | ||
224 | ATP_GEYSER3_MODE_READ_REQUEST_ID, | ||
225 | USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | ||
226 | ATP_GEYSER3_MODE_REQUEST_VALUE, | ||
227 | ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); | ||
228 | |||
229 | if (size != 8) { | ||
230 | err("Could not do mode read request from device" | ||
231 | " (Geyser 3 mode)"); | ||
232 | return -EIO; | ||
233 | } | ||
234 | |||
235 | /* Apply the mode switch */ | ||
236 | data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE; | ||
237 | |||
238 | size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | ||
239 | ATP_GEYSER3_MODE_WRITE_REQUEST_ID, | ||
240 | USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | ||
241 | ATP_GEYSER3_MODE_REQUEST_VALUE, | ||
242 | ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); | ||
243 | |||
244 | if (size != 8) { | ||
245 | err("Could not do mode write request to device" | ||
246 | " (Geyser 3 mode)"); | ||
247 | return -EIO; | ||
248 | } | ||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | /* Reinitialise the device if it's a geyser 3 */ | ||
253 | static void atp_reinit(struct work_struct *work) | ||
254 | { | ||
255 | struct atp *dev = container_of(work, struct atp, work); | ||
256 | struct usb_device *udev = dev->udev; | ||
257 | |||
258 | dev->idlecount = 0; | ||
259 | atp_geyser3_init(udev); | ||
260 | } | ||
261 | |||
211 | static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, | 262 | static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, |
212 | int *z, int *fingers) | 263 | int *z, int *fingers) |
213 | { | 264 | { |
@@ -277,6 +328,7 @@ static void atp_complete(struct urb* urb) | |||
277 | { | 328 | { |
278 | int x, y, x_z, y_z, x_f, y_f; | 329 | int x, y, x_z, y_z, x_f, y_f; |
279 | int retval, i, j; | 330 | int retval, i, j; |
331 | int key; | ||
280 | struct atp *dev = urb->context; | 332 | struct atp *dev = urb->context; |
281 | 333 | ||
282 | switch (urb->status) { | 334 | switch (urb->status) { |
@@ -417,6 +469,7 @@ static void atp_complete(struct urb* urb) | |||
417 | ATP_XFACT, &x_z, &x_f); | 469 | ATP_XFACT, &x_z, &x_f); |
418 | y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, | 470 | y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, |
419 | ATP_YFACT, &y_z, &y_f); | 471 | ATP_YFACT, &y_z, &y_f); |
472 | key = dev->data[dev->datalen - 1] & 1; | ||
420 | 473 | ||
421 | if (x && y) { | 474 | if (x && y) { |
422 | if (dev->x_old != -1) { | 475 | if (dev->x_old != -1) { |
@@ -439,8 +492,8 @@ static void atp_complete(struct urb* urb) | |||
439 | } | 492 | } |
440 | dev->x_old = x; | 493 | dev->x_old = x; |
441 | dev->y_old = y; | 494 | dev->y_old = y; |
442 | } | 495 | |
443 | else if (!x && !y) { | 496 | } else if (!x && !y) { |
444 | 497 | ||
445 | dev->x_old = dev->y_old = -1; | 498 | dev->x_old = dev->y_old = -1; |
446 | input_report_key(dev->input, BTN_TOUCH, 0); | 499 | input_report_key(dev->input, BTN_TOUCH, 0); |
@@ -449,11 +502,21 @@ static void atp_complete(struct urb* urb) | |||
449 | 502 | ||
450 | /* reset the accumulator on release */ | 503 | /* reset the accumulator on release */ |
451 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); | 504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); |
452 | } | ||
453 | 505 | ||
454 | input_report_key(dev->input, BTN_LEFT, | 506 | /* Geyser 3 will continue to send packets continually after |
455 | !!dev->data[dev->datalen - 1]); | 507 | the first touch unless reinitialised. Do so if it's been |
508 | idle for a while in order to avoid waking the kernel up | ||
509 | several hundred times a second */ | ||
510 | if (!key && atp_is_geyser_3(dev)) { | ||
511 | dev->idlecount++; | ||
512 | if (dev->idlecount == 10) { | ||
513 | dev->valid = 0; | ||
514 | schedule_work(&dev->work); | ||
515 | } | ||
516 | } | ||
517 | } | ||
456 | 518 | ||
519 | input_report_key(dev->input, BTN_LEFT, key); | ||
457 | input_sync(dev->input); | 520 | input_sync(dev->input); |
458 | 521 | ||
459 | exit: | 522 | exit: |
@@ -480,6 +543,7 @@ static void atp_close(struct input_dev *input) | |||
480 | struct atp *dev = input_get_drvdata(input); | 543 | struct atp *dev = input_get_drvdata(input); |
481 | 544 | ||
482 | usb_kill_urb(dev->urb); | 545 | usb_kill_urb(dev->urb); |
546 | cancel_work_sync(&dev->work); | ||
483 | dev->open = 0; | 547 | dev->open = 0; |
484 | } | 548 | } |
485 | 549 | ||
@@ -528,40 +592,10 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id | |||
528 | dev->datalen = 81; | 592 | dev->datalen = 81; |
529 | 593 | ||
530 | if (atp_is_geyser_3(dev)) { | 594 | if (atp_is_geyser_3(dev)) { |
531 | /* | 595 | /* switch to raw sensor mode */ |
532 | * By default Geyser 3 device sends standard USB HID mouse | 596 | if (atp_geyser3_init(udev)) |
533 | * packets (Report ID 2). This code changes device mode, so it | ||
534 | * sends raw sensor reports (Report ID 5). | ||
535 | */ | ||
536 | char data[8]; | ||
537 | int size; | ||
538 | |||
539 | size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | ||
540 | ATP_GEYSER3_MODE_READ_REQUEST_ID, | ||
541 | USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | ||
542 | ATP_GEYSER3_MODE_REQUEST_VALUE, | ||
543 | ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); | ||
544 | |||
545 | if (size != 8) { | ||
546 | err("Could not do mode read request from device" | ||
547 | " (Geyser 3 mode)"); | ||
548 | goto err_free_devs; | 597 | goto err_free_devs; |
549 | } | ||
550 | |||
551 | /* Apply the mode switch */ | ||
552 | data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE; | ||
553 | |||
554 | size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | ||
555 | ATP_GEYSER3_MODE_WRITE_REQUEST_ID, | ||
556 | USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | ||
557 | ATP_GEYSER3_MODE_REQUEST_VALUE, | ||
558 | ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); | ||
559 | 598 | ||
560 | if (size != 8) { | ||
561 | err("Could not do mode write request to device" | ||
562 | " (Geyser 3 mode)"); | ||
563 | goto err_free_devs; | ||
564 | } | ||
565 | printk("appletouch Geyser 3 inited.\n"); | 599 | printk("appletouch Geyser 3 inited.\n"); |
566 | } | 600 | } |
567 | 601 | ||
@@ -636,6 +670,8 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id | |||
636 | /* save our data pointer in this interface device */ | 670 | /* save our data pointer in this interface device */ |
637 | usb_set_intfdata(iface, dev); | 671 | usb_set_intfdata(iface, dev); |
638 | 672 | ||
673 | INIT_WORK(&dev->work, atp_reinit); | ||
674 | |||
639 | return 0; | 675 | return 0; |
640 | 676 | ||
641 | err_free_buffer: | 677 | err_free_buffer: |
@@ -669,14 +705,17 @@ static void atp_disconnect(struct usb_interface *iface) | |||
669 | static int atp_suspend(struct usb_interface *iface, pm_message_t message) | 705 | static int atp_suspend(struct usb_interface *iface, pm_message_t message) |
670 | { | 706 | { |
671 | struct atp *dev = usb_get_intfdata(iface); | 707 | struct atp *dev = usb_get_intfdata(iface); |
708 | |||
672 | usb_kill_urb(dev->urb); | 709 | usb_kill_urb(dev->urb); |
673 | dev->valid = 0; | 710 | dev->valid = 0; |
711 | |||
674 | return 0; | 712 | return 0; |
675 | } | 713 | } |
676 | 714 | ||
677 | static int atp_resume(struct usb_interface *iface) | 715 | static int atp_resume(struct usb_interface *iface) |
678 | { | 716 | { |
679 | struct atp *dev = usb_get_intfdata(iface); | 717 | struct atp *dev = usb_get_intfdata(iface); |
718 | |||
680 | if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC)) | 719 | if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC)) |
681 | return -EIO; | 720 | return -EIO; |
682 | 721 | ||
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 9561dee120c6..d7de4c53b3d8 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -27,7 +27,7 @@ struct lifebook_data { | |||
27 | 27 | ||
28 | static const char *desired_serio_phys; | 28 | static const char *desired_serio_phys; |
29 | 29 | ||
30 | static int lifebook_set_serio_phys(struct dmi_system_id *d) | 30 | static int lifebook_set_serio_phys(const struct dmi_system_id *d) |
31 | { | 31 | { |
32 | desired_serio_phys = d->driver_data; | 32 | desired_serio_phys = d->driver_data; |
33 | return 0; | 33 | return 0; |
@@ -35,13 +35,13 @@ static int lifebook_set_serio_phys(struct dmi_system_id *d) | |||
35 | 35 | ||
36 | static unsigned char lifebook_use_6byte_proto; | 36 | static unsigned char lifebook_use_6byte_proto; |
37 | 37 | ||
38 | static int lifebook_set_6byte_proto(struct dmi_system_id *d) | 38 | static int lifebook_set_6byte_proto(const struct dmi_system_id *d) |
39 | { | 39 | { |
40 | lifebook_use_6byte_proto = 1; | 40 | lifebook_use_6byte_proto = 1; |
41 | return 0; | 41 | return 0; |
42 | } | 42 | } |
43 | 43 | ||
44 | static struct dmi_system_id lifebook_dmi_table[] = { | 44 | static const struct dmi_system_id lifebook_dmi_table[] = { |
45 | { | 45 | { |
46 | .ident = "FLORA-ie 55mi", | 46 | .ident = "FLORA-ie 55mi", |
47 | .matches = { | 47 | .matches = { |
@@ -117,7 +117,7 @@ static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse) | |||
117 | { | 117 | { |
118 | struct lifebook_data *priv = psmouse->private; | 118 | struct lifebook_data *priv = psmouse->private; |
119 | struct input_dev *dev1 = psmouse->dev; | 119 | struct input_dev *dev1 = psmouse->dev; |
120 | struct input_dev *dev2 = priv->dev2; | 120 | struct input_dev *dev2 = priv ? priv->dev2 : NULL; |
121 | unsigned char *packet = psmouse->packet; | 121 | unsigned char *packet = psmouse->packet; |
122 | int relative_packet = packet[0] & 0x08; | 122 | int relative_packet = packet[0] & 0x08; |
123 | 123 | ||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 666ad3a53fdb..d349c4a5e3e8 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -602,7 +602,7 @@ static int synaptics_reconnect(struct psmouse *psmouse) | |||
602 | 602 | ||
603 | #if defined(__i386__) | 603 | #if defined(__i386__) |
604 | #include <linux/dmi.h> | 604 | #include <linux/dmi.h> |
605 | static struct dmi_system_id toshiba_dmi_table[] = { | 605 | static const struct dmi_system_id toshiba_dmi_table[] = { |
606 | { | 606 | { |
607 | .ident = "Toshiba Satellite", | 607 | .ident = "Toshiba Satellite", |
608 | .matches = { | 608 | .matches = { |
diff --git a/drivers/input/mouse/touchkit_ps2.h b/drivers/input/mouse/touchkit_ps2.h index 61e9dfd8419f..8a0dd3574aef 100644 --- a/drivers/input/mouse/touchkit_ps2.h +++ b/drivers/input/mouse/touchkit_ps2.h | |||
@@ -15,7 +15,8 @@ | |||
15 | #ifdef CONFIG_MOUSE_PS2_TOUCHKIT | 15 | #ifdef CONFIG_MOUSE_PS2_TOUCHKIT |
16 | int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties); | 16 | int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties); |
17 | #else | 17 | #else |
18 | inline int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties) | 18 | static inline int touchkit_ps2_detect(struct psmouse *psmouse, |
19 | int set_properties) | ||
19 | { | 20 | { |
20 | return -ENOSYS; | 21 | return -ENOSYS; |
21 | } | 22 | } |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index adef447f23ea..5ce632ca6815 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -21,7 +21,7 @@ if SERIO | |||
21 | config SERIO_I8042 | 21 | config SERIO_I8042 |
22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 | 22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 |
23 | default y | 23 | default y |
24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K | 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BFIN |
25 | ---help--- | 25 | ---help--- |
26 | i8042 is the chip over which the standard AT keyboard and PS/2 | 26 | i8042 is the chip over which the standard AT keyboard and PS/2 |
27 | mouse are connected to the computer. If you use these devices, | 27 | mouse are connected to the computer. If you use these devices, |
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 5a7b49c35539..b10ffae7c39b 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -117,15 +117,13 @@ static int amba_kmi_probe(struct amba_device *dev, void *id) | |||
117 | if (ret) | 117 | if (ret) |
118 | return ret; | 118 | return ret; |
119 | 119 | ||
120 | kmi = kmalloc(sizeof(struct amba_kmi_port), GFP_KERNEL); | 120 | kmi = kzalloc(sizeof(struct amba_kmi_port), GFP_KERNEL); |
121 | io = kmalloc(sizeof(struct serio), GFP_KERNEL); | 121 | io = kzalloc(sizeof(struct serio), GFP_KERNEL); |
122 | if (!kmi || !io) { | 122 | if (!kmi || !io) { |
123 | ret = -ENOMEM; | 123 | ret = -ENOMEM; |
124 | goto out; | 124 | goto out; |
125 | } | 125 | } |
126 | 126 | ||
127 | memset(kmi, 0, sizeof(struct amba_kmi_port)); | ||
128 | memset(io, 0, sizeof(struct serio)); | ||
129 | 127 | ||
130 | io->id.type = SERIO_8042; | 128 | io->id.type = SERIO_8042; |
131 | io->write = amba_kmi_write; | 129 | io->write = amba_kmi_write; |
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 74f14e097789..3e99df6be084 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -340,8 +340,8 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
340 | if (dev->id.sversion == 0x96) | 340 | if (dev->id.sversion == 0x96) |
341 | hpa += GSC_DINO_OFFSET; | 341 | hpa += GSC_DINO_OFFSET; |
342 | 342 | ||
343 | ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL); | 343 | ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL); |
344 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 344 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
345 | if (!ps2port || !serio) { | 345 | if (!ps2port || !serio) { |
346 | ret = -ENOMEM; | 346 | ret = -ENOMEM; |
347 | goto fail_nomem; | 347 | goto fail_nomem; |
@@ -349,8 +349,6 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
349 | 349 | ||
350 | dev_set_drvdata(&dev->dev, ps2port); | 350 | dev_set_drvdata(&dev->dev, ps2port); |
351 | 351 | ||
352 | memset(ps2port, 0, sizeof(struct gscps2port)); | ||
353 | memset(serio, 0, sizeof(struct serio)); | ||
354 | ps2port->port = serio; | 352 | ps2port->port = serio; |
355 | ps2port->padev = dev; | 353 | ps2port->padev = dev; |
356 | ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); | 354 | ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 702a526cf45b..f8fe42148093 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -211,6 +211,16 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
211 | }, | 211 | }, |
212 | }, | 212 | }, |
213 | { | 213 | { |
214 | /* | ||
215 | * Like DV4017EA does not raise AUXERR for errors on MUX ports. | ||
216 | */ | ||
217 | .ident = "HP Pavilion DV4270ca", | ||
218 | .matches = { | ||
219 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
220 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"), | ||
221 | }, | ||
222 | }, | ||
223 | { | ||
214 | .ident = "Toshiba P10", | 224 | .ident = "Toshiba P10", |
215 | .matches = { | 225 | .matches = { |
216 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 226 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 42aa4ec72661..11dafc0ee994 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -516,6 +516,7 @@ static irqreturn_t __devinit i8042_aux_test_irq(int irq, void *dev_id) | |||
516 | { | 516 | { |
517 | unsigned long flags; | 517 | unsigned long flags; |
518 | unsigned char str, data; | 518 | unsigned char str, data; |
519 | int ret = 0; | ||
519 | 520 | ||
520 | spin_lock_irqsave(&i8042_lock, flags); | 521 | spin_lock_irqsave(&i8042_lock, flags); |
521 | str = i8042_read_status(); | 522 | str = i8042_read_status(); |
@@ -524,10 +525,11 @@ static irqreturn_t __devinit i8042_aux_test_irq(int irq, void *dev_id) | |||
524 | if (i8042_irq_being_tested && | 525 | if (i8042_irq_being_tested && |
525 | data == 0xa5 && (str & I8042_STR_AUXDATA)) | 526 | data == 0xa5 && (str & I8042_STR_AUXDATA)) |
526 | complete(&i8042_aux_irq_delivered); | 527 | complete(&i8042_aux_irq_delivered); |
528 | ret = 1; | ||
527 | } | 529 | } |
528 | spin_unlock_irqrestore(&i8042_lock, flags); | 530 | spin_unlock_irqrestore(&i8042_lock, flags); |
529 | 531 | ||
530 | return IRQ_HANDLED; | 532 | return IRQ_RETVAL(ret); |
531 | } | 533 | } |
532 | 534 | ||
533 | /* | 535 | /* |
@@ -1042,7 +1044,7 @@ static void __devinit i8042_register_ports(void) | |||
1042 | } | 1044 | } |
1043 | } | 1045 | } |
1044 | 1046 | ||
1045 | static void __devinit i8042_unregister_ports(void) | 1047 | static void __devexit i8042_unregister_ports(void) |
1046 | { | 1048 | { |
1047 | int i; | 1049 | int i; |
1048 | 1050 | ||
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index ea5e3c6ddb62..1b404f9e3bff 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
@@ -140,15 +140,13 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i | |||
140 | if (ret) | 140 | if (ret) |
141 | goto disable; | 141 | goto disable; |
142 | 142 | ||
143 | ps2if = kmalloc(sizeof(struct pcips2_data), GFP_KERNEL); | 143 | ps2if = kzalloc(sizeof(struct pcips2_data), GFP_KERNEL); |
144 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 144 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
145 | if (!ps2if || !serio) { | 145 | if (!ps2if || !serio) { |
146 | ret = -ENOMEM; | 146 | ret = -ENOMEM; |
147 | goto release; | 147 | goto release; |
148 | } | 148 | } |
149 | 149 | ||
150 | memset(ps2if, 0, sizeof(struct pcips2_data)); | ||
151 | memset(serio, 0, sizeof(struct serio)); | ||
152 | 150 | ||
153 | serio->id.type = SERIO_8042; | 151 | serio->id.type = SERIO_8042; |
154 | serio->write = pcips2_write; | 152 | serio->write = pcips2_write; |
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index d31ece8f68e9..2ad88780a170 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c | |||
@@ -234,15 +234,13 @@ static int __devinit ps2_probe(struct sa1111_dev *dev) | |||
234 | struct serio *serio; | 234 | struct serio *serio; |
235 | int ret; | 235 | int ret; |
236 | 236 | ||
237 | ps2if = kmalloc(sizeof(struct ps2if), GFP_KERNEL); | 237 | ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL); |
238 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 238 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
239 | if (!ps2if || !serio) { | 239 | if (!ps2if || !serio) { |
240 | ret = -ENOMEM; | 240 | ret = -ENOMEM; |
241 | goto free; | 241 | goto free; |
242 | } | 242 | } |
243 | 243 | ||
244 | memset(ps2if, 0, sizeof(struct ps2if)); | ||
245 | memset(serio, 0, sizeof(struct serio)); | ||
246 | 244 | ||
247 | serio->id.type = SERIO_8042; | 245 | serio->id.type = SERIO_8042; |
248 | serio->write = ps2_write; | 246 | serio->write = ps2_write; |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 372ca4931194..b3bc15acd3f5 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -876,18 +876,14 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv) | |||
876 | 876 | ||
877 | #define SERIO_ADD_UEVENT_VAR(fmt, val...) \ | 877 | #define SERIO_ADD_UEVENT_VAR(fmt, val...) \ |
878 | do { \ | 878 | do { \ |
879 | int err = add_uevent_var(envp, num_envp, &i, \ | 879 | int err = add_uevent_var(env, fmt, val); \ |
880 | buffer, buffer_size, &len, \ | ||
881 | fmt, val); \ | ||
882 | if (err) \ | 880 | if (err) \ |
883 | return err; \ | 881 | return err; \ |
884 | } while (0) | 882 | } while (0) |
885 | 883 | ||
886 | static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) | 884 | static int serio_uevent(struct device *dev, struct kobj_uevent_env *env) |
887 | { | 885 | { |
888 | struct serio *serio; | 886 | struct serio *serio; |
889 | int i = 0; | ||
890 | int len = 0; | ||
891 | 887 | ||
892 | if (!dev) | 888 | if (!dev) |
893 | return -ENODEV; | 889 | return -ENODEV; |
@@ -900,7 +896,6 @@ static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buf | |||
900 | SERIO_ADD_UEVENT_VAR("SERIO_EXTRA=%02x", serio->id.extra); | 896 | SERIO_ADD_UEVENT_VAR("SERIO_EXTRA=%02x", serio->id.extra); |
901 | SERIO_ADD_UEVENT_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X", | 897 | SERIO_ADD_UEVENT_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X", |
902 | serio->id.type, serio->id.proto, serio->id.id, serio->id.extra); | 898 | serio->id.type, serio->id.proto, serio->id.id, serio->id.extra); |
903 | envp[i] = NULL; | ||
904 | 899 | ||
905 | return 0; | 900 | return 0; |
906 | } | 901 | } |
@@ -908,7 +903,7 @@ static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buf | |||
908 | 903 | ||
909 | #else | 904 | #else |
910 | 905 | ||
911 | static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) | 906 | static int serio_uevent(struct device *dev, struct kobj_uevent_env *env) |
912 | { | 907 | { |
913 | return -ENODEV; | 908 | return -ENODEV; |
914 | } | 909 | } |
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 9b3a26cd1a8d..9fb3d5c30999 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -856,7 +856,7 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
856 | le16_to_cpu(udev->descriptor.idProduct)); | 856 | le16_to_cpu(udev->descriptor.idProduct)); |
857 | 857 | ||
858 | usb_make_path(udev, usbtouch->phys, sizeof(usbtouch->phys)); | 858 | usb_make_path(udev, usbtouch->phys, sizeof(usbtouch->phys)); |
859 | strlcpy(usbtouch->phys, "/input0", sizeof(usbtouch->phys)); | 859 | strlcat(usbtouch->phys, "/input0", sizeof(usbtouch->phys)); |
860 | 860 | ||
861 | input_dev->name = usbtouch->name; | 861 | input_dev->name = usbtouch->name; |
862 | input_dev->phys = usbtouch->phys; | 862 | input_dev->phys = usbtouch->phys; |