summaryrefslogtreecommitdiffstats
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-08-02 20:15:17 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-02 20:29:56 -0700
commit987a6c0298260b7aa40702b349282554d6180e4b (patch)
tree29d0873435221a6d731267efc2412814440e4a28 /drivers/input/evdev.c
parent7957e9c4d175cc065f4277211fcb7d784fcee860 (diff)
Input: switch to input_abs_*() access functions
Change all call sites in drivers/input to not access the ABS axis information directly anymore. Make them use the access helpers instead. Also use input_set_abs_params() when possible. Did some code refactoring as I was on it. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 054edf346e0..9807c8ff6a8 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -650,12 +650,12 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
t = _IOC_NR(cmd) & ABS_MAX;
- abs.value = dev->abs[t];
- abs.minimum = dev->absmin[t];
- abs.maximum = dev->absmax[t];
- abs.fuzz = dev->absfuzz[t];
- abs.flat = dev->absflat[t];
- abs.resolution = dev->absres[t];
+ abs.value = input_abs_get_val(dev, t);
+ abs.minimum = input_abs_get_min(dev, t);
+ abs.maximum = input_abs_get_max(dev, t);
+ abs.fuzz = input_abs_get_fuzz(dev, t);
+ abs.flat = input_abs_get_flat(dev, t);
+ abs.resolution = input_abs_get_res(dev, t);
if (copy_to_user(p, &abs, min_t(size_t,
_IOC_SIZE(cmd),
@@ -702,13 +702,13 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
*/
spin_lock_irq(&dev->event_lock);
- dev->abs[t] = abs.value;
- dev->absmin[t] = abs.minimum;
- dev->absmax[t] = abs.maximum;
- dev->absfuzz[t] = abs.fuzz;
- dev->absflat[t] = abs.flat;
- dev->absres[t] = _IOC_SIZE(cmd) < sizeof(struct input_absinfo) ?
- 0 : abs.resolution;
+ input_abs_set_val(dev, t, abs.value);
+ input_abs_set_min(dev, t, abs.minimum);
+ input_abs_set_max(dev, t, abs.maximum);
+ input_abs_set_fuzz(dev, t, abs.fuzz);
+ input_abs_set_flat(dev, t, abs.flat);
+ input_abs_set_res(dev, t, _IOC_SIZE(cmd) < sizeof(struct input_absinfo) ?
+ 0 : abs.resolution);
spin_unlock_irq(&dev->event_lock);