aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/atkbd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 11:52:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 11:52:08 -0700
commit36ac1d2f323f8bf8bc10c25b88f617657720e241 (patch)
treed51f87bdf16eaa19ce0c5a682c10dccfaef4b48d /drivers/input/keyboard/atkbd.c
parentd7a6119f457f48a94985fdbdc400cbb03e136a76 (diff)
parent4c0e799a9a6dc64426ddb6c03aea1a154357658f (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: (32 commits) Input: wm97xx - update email address for Liam Girdwood Input: i8042 - add Thinkpad R31 to nomux list Input: move map_to_7segment.h to include/linux Input: ads7846 - fix cache line sharing issue Input: cm109 - add missing newlines to messages Input: document i8042.debug in kernel-parameters.txt Input: keyboard - fix potential out of bound access to key_map Input: psmouse - add OLPC touchpad driver Input: psmouse - tweak PSMOUSE_DEFINE_ATTR to support raw set callbacks Input: psmouse - add psmouse_queue_work() for ps/2 extension to make use of Input: psmouse - export psmouse_set_state for ps/2 extensions to use Input: ads7846 - introduce .gpio_pendown to get pendown state Input: ALPS - add signature for DualPoint found in Dell Latitude E6500 Input: serio_raw - allow attaching to translated (SERIO_I8042XL) ports Input: cm109 - don't use obsolete logging macros Input: atkbd - expand Latitude's force release quirk to other Dells Input: bf54x-keys - add power management support Input: atmel_tsadcc - improve accuracy Input: convert drivers to use strict_strtoul() Input: appletouch - handle geyser 3/4 status bits ...
Diffstat (limited to 'drivers/input/keyboard/atkbd.c')
-rw-r--r--drivers/input/keyboard/atkbd.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index b1ce10f50bc..22016ca1535 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -834,10 +834,10 @@ static void atkbd_disconnect(struct serio *serio)
}
/*
- * Most special keys (Fn+F?) on Dell Latitudes do not generate release
+ * Most special keys (Fn+F?) on Dell laptops do not generate release
* events so we have to do it ourselves.
*/
-static void atkbd_latitude_keymap_fixup(struct atkbd *atkbd)
+static void atkbd_dell_laptop_keymap_fixup(struct atkbd *atkbd)
{
const unsigned int forced_release_keys[] = {
0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8f, 0x93,
@@ -1207,15 +1207,13 @@ static ssize_t atkbd_set_extra(struct atkbd *atkbd, const char *buf, size_t coun
{
struct input_dev *old_dev, *new_dev;
unsigned long value;
- char *rest;
int err;
unsigned char old_extra, old_set;
if (!atkbd->write)
return -EIO;
- value = simple_strtoul(buf, &rest, 10);
- if (*rest || value > 1)
+ if (strict_strtoul(buf, 10, &value) || value > 1)
return -EINVAL;
if (atkbd->extra != value) {
@@ -1264,12 +1262,10 @@ static ssize_t atkbd_set_scroll(struct atkbd *atkbd, const char *buf, size_t cou
{
struct input_dev *old_dev, *new_dev;
unsigned long value;
- char *rest;
int err;
unsigned char old_scroll;
- value = simple_strtoul(buf, &rest, 10);
- if (*rest || value > 1)
+ if (strict_strtoul(buf, 10, &value) || value > 1)
return -EINVAL;
if (atkbd->scroll != value) {
@@ -1310,15 +1306,13 @@ static ssize_t atkbd_set_set(struct atkbd *atkbd, const char *buf, size_t count)
{
struct input_dev *old_dev, *new_dev;
unsigned long value;
- char *rest;
int err;
unsigned char old_set, old_extra;
if (!atkbd->write)
return -EIO;
- value = simple_strtoul(buf, &rest, 10);
- if (*rest || (value != 2 && value != 3))
+ if (strict_strtoul(buf, 10, &value) || (value != 2 && value != 3))
return -EINVAL;
if (atkbd->set != value) {
@@ -1361,15 +1355,13 @@ static ssize_t atkbd_set_softrepeat(struct atkbd *atkbd, const char *buf, size_t
{
struct input_dev *old_dev, *new_dev;
unsigned long value;
- char *rest;
int err;
unsigned char old_softrepeat, old_softraw;
if (!atkbd->write)
return -EIO;
- value = simple_strtoul(buf, &rest, 10);
- if (*rest || value > 1)
+ if (strict_strtoul(buf, 10, &value) || value > 1)
return -EINVAL;
if (atkbd->softrepeat != value) {
@@ -1413,12 +1405,10 @@ static ssize_t atkbd_set_softraw(struct atkbd *atkbd, const char *buf, size_t co
{
struct input_dev *old_dev, *new_dev;
unsigned long value;
- char *rest;
int err;
unsigned char old_softraw;
- value = simple_strtoul(buf, &rest, 10);
- if (*rest || value > 1)
+ if (strict_strtoul(buf, 10, &value) || value > 1)
return -EINVAL;
if (atkbd->softraw != value) {
@@ -1461,13 +1451,13 @@ static int __init atkbd_setup_fixup(const struct dmi_system_id *id)
static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
{
- .ident = "Dell Latitude series",
+ .ident = "Dell Laptop",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
+ DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
},
.callback = atkbd_setup_fixup,
- .driver_data = atkbd_latitude_keymap_fixup,
+ .driver_data = atkbd_dell_laptop_keymap_fixup,
},
{
.ident = "HP 2133",