diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-04 13:57:42 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-04 13:57:42 -0500 |
| commit | 31c150a11c867da233a7b5e13b45bcbd3a796bde (patch) | |
| tree | 58202fc8e93833f3ea3e52f9cb0093e61265d73d /drivers/input/serio | |
| parent | 4554c135a0a017f4cd96f7c0612cb7ca78c68d08 (diff) | |
| parent | 82b982c9a697e7be0745523a53334fe38a4582c8 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: i8042 - add Lenovo Ideapad U455 to 'reset' blacklist
Input: serio_raw - return proper result when serio_raw_read fails
Input: document device properties
Input: twl4030_keypad - fix comment (trivial)
Input: gpio_keys - fix struct device declared inside parameter list
Input: evdev - fix variable initialisation
Diffstat (limited to 'drivers/input/serio')
| -rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 7 | ||||
| -rw-r--r-- | drivers/input/serio/serio_raw.c | 15 |
2 files changed, 16 insertions, 6 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index b4cfc6c8be89..5ec774d6c82b 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
| @@ -512,6 +512,13 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { | |||
| 512 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), | 512 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), |
| 513 | }, | 513 | }, |
| 514 | }, | 514 | }, |
| 515 | { | ||
| 516 | /* Lenovo Ideapad U455 */ | ||
| 517 | .matches = { | ||
| 518 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 519 | DMI_MATCH(DMI_PRODUCT_NAME, "20046"), | ||
| 520 | }, | ||
| 521 | }, | ||
| 515 | { } | 522 | { } |
| 516 | }; | 523 | }; |
| 517 | 524 | ||
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 8250299fd64f..4494233d331a 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
| @@ -164,7 +164,8 @@ static ssize_t serio_raw_read(struct file *file, char __user *buffer, | |||
| 164 | struct serio_raw_client *client = file->private_data; | 164 | struct serio_raw_client *client = file->private_data; |
| 165 | struct serio_raw *serio_raw = client->serio_raw; | 165 | struct serio_raw *serio_raw = client->serio_raw; |
| 166 | char uninitialized_var(c); | 166 | char uninitialized_var(c); |
| 167 | ssize_t retval = 0; | 167 | ssize_t read = 0; |
| 168 | int retval; | ||
| 168 | 169 | ||
| 169 | if (serio_raw->dead) | 170 | if (serio_raw->dead) |
| 170 | return -ENODEV; | 171 | return -ENODEV; |
| @@ -180,13 +181,15 @@ static ssize_t serio_raw_read(struct file *file, char __user *buffer, | |||
| 180 | if (serio_raw->dead) | 181 | if (serio_raw->dead) |
| 181 | return -ENODEV; | 182 | return -ENODEV; |
| 182 | 183 | ||
| 183 | while (retval < count && serio_raw_fetch_byte(serio_raw, &c)) { | 184 | while (read < count && serio_raw_fetch_byte(serio_raw, &c)) { |
| 184 | if (put_user(c, buffer++)) | 185 | if (put_user(c, buffer++)) { |
| 185 | return -EFAULT; | 186 | retval = -EFAULT; |
| 186 | retval++; | 187 | break; |
| 188 | } | ||
| 189 | read++; | ||
| 187 | } | 190 | } |
| 188 | 191 | ||
| 189 | return retval; | 192 | return read ?: retval; |
| 190 | } | 193 | } |
| 191 | 194 | ||
| 192 | static ssize_t serio_raw_write(struct file *file, const char __user *buffer, | 195 | static ssize_t serio_raw_write(struct file *file, const char __user *buffer, |
