diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-08-02 23:15:17 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-02 23:29:56 -0400 |
commit | 987a6c0298260b7aa40702b349282554d6180e4b (patch) | |
tree | 29d0873435221a6d731267efc2412814440e4a28 /drivers/input/evdev.c | |
parent | 7957e9c4d175cc065f4277211fcb7d784fcee860 (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.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 054edf346e0b..9807c8ff6a84 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, | |||
650 | 650 | ||
651 | t = _IOC_NR(cmd) & ABS_MAX; | 651 | t = _IOC_NR(cmd) & ABS_MAX; |
652 | 652 | ||
653 | abs.value = dev->abs[t]; | 653 | abs.value = input_abs_get_val(dev, t); |
654 | abs.minimum = dev->absmin[t]; | 654 | abs.minimum = input_abs_get_min(dev, t); |
655 | abs.maximum = dev->absmax[t]; | 655 | abs.maximum = input_abs_get_max(dev, t); |
656 | abs.fuzz = dev->absfuzz[t]; | 656 | abs.fuzz = input_abs_get_fuzz(dev, t); |
657 | abs.flat = dev->absflat[t]; | 657 | abs.flat = input_abs_get_flat(dev, t); |
658 | abs.resolution = dev->absres[t]; | 658 | abs.resolution = input_abs_get_res(dev, t); |
659 | 659 | ||
660 | if (copy_to_user(p, &abs, min_t(size_t, | 660 | if (copy_to_user(p, &abs, min_t(size_t, |
661 | _IOC_SIZE(cmd), | 661 | _IOC_SIZE(cmd), |
@@ -702,13 +702,13 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd, | |||
702 | */ | 702 | */ |
703 | spin_lock_irq(&dev->event_lock); | 703 | spin_lock_irq(&dev->event_lock); |
704 | 704 | ||
705 | dev->abs[t] = abs.value; | 705 | input_abs_set_val(dev, t, abs.value); |
706 | dev->absmin[t] = abs.minimum; | 706 | input_abs_set_min(dev, t, abs.minimum); |
707 | dev->absmax[t] = abs.maximum; | 707 | input_abs_set_max(dev, t, abs.maximum); |
708 | dev->absfuzz[t] = abs.fuzz; | 708 | input_abs_set_fuzz(dev, t, abs.fuzz); |
709 | dev->absflat[t] = abs.flat; | 709 | input_abs_set_flat(dev, t, abs.flat); |
710 | dev->absres[t] = _IOC_SIZE(cmd) < sizeof(struct input_absinfo) ? | 710 | input_abs_set_res(dev, t, _IOC_SIZE(cmd) < sizeof(struct input_absinfo) ? |
711 | 0 : abs.resolution; | 711 | 0 : abs.resolution); |
712 | 712 | ||
713 | spin_unlock_irq(&dev->event_lock); | 713 | spin_unlock_irq(&dev->event_lock); |
714 | 714 | ||