aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/hgpk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 13:55:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 13:55:52 -0500
commitdbe950f201a8edd353b0bd9079e8d536ee4ce37c (patch)
treedffbada6b3d33cc67383758570de22b4f45693b6 /drivers/input/mouse/hgpk.c
parentf62f61917d72c1fb0101ad405664f6fc868d676b (diff)
parentda733563be5a9da26fe81d9f007262d00b846e22 (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: (64 commits) Input: tc3589x-keypad - add missing kerneldoc Input: ucb1400-ts - switch to using dev_xxx() for diagnostic messages Input: ucb1400_ts - convert to threaded IRQ Input: ucb1400_ts - drop inline annotations Input: usb1400_ts - add __devinit/__devexit section annotations Input: ucb1400_ts - set driver owner Input: ucb1400_ts - convert to use dev_pm_ops Input: psmouse - make sure we do not use stale methods Input: evdev - do not block waiting for an event if fd is nonblock Input: evdev - if no events and non-block, return EAGAIN not 0 Input: evdev - only allow reading events if a full packet is present Input: add driver for pixcir i2c touchscreens Input: samsung-keypad - implement runtime power management support Input: tegra-kbc - report wakeup key for some platforms Input: tegra-kbc - add device tree bindings Input: add driver for AUO In-Cell touchscreens using pixcir ICs Input: mpu3050 - configure the sampling method Input: mpu3050 - ensure we enable interrupts Input: mpu3050 - add of_match table for device-tree probing Input: sentelic - document the latest hardware ... Fix up fairly trivial conflicts (device tree matching conflicting with some independent cleanups) in drivers/input/keyboard/samsung-keypad.c
Diffstat (limited to 'drivers/input/mouse/hgpk.c')
-rw-r--r--drivers/input/mouse/hgpk.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index 0470dd46b566..1c5d521de600 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -789,11 +789,14 @@ static ssize_t hgpk_set_powered(struct psmouse *psmouse, void *data,
789 const char *buf, size_t count) 789 const char *buf, size_t count)
790{ 790{
791 struct hgpk_data *priv = psmouse->private; 791 struct hgpk_data *priv = psmouse->private;
792 unsigned long value; 792 unsigned int value;
793 int err; 793 int err;
794 794
795 err = strict_strtoul(buf, 10, &value); 795 err = kstrtouint(buf, 10, &value);
796 if (err || value > 1) 796 if (err)
797 return err;
798
799 if (value > 1)
797 return -EINVAL; 800 return -EINVAL;
798 801
799 if (value != priv->powered) { 802 if (value != priv->powered) {
@@ -881,11 +884,14 @@ static ssize_t hgpk_trigger_recal(struct psmouse *psmouse, void *data,
881 const char *buf, size_t count) 884 const char *buf, size_t count)
882{ 885{
883 struct hgpk_data *priv = psmouse->private; 886 struct hgpk_data *priv = psmouse->private;
884 unsigned long value; 887 unsigned int value;
885 int err; 888 int err;
886 889
887 err = strict_strtoul(buf, 10, &value); 890 err = kstrtouint(buf, 10, &value);
888 if (err || value != 1) 891 if (err)
892 return err;
893
894 if (value != 1)
889 return -EINVAL; 895 return -EINVAL;
890 896
891 /* 897 /*