summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/interact.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/joystick/interact.c
parent7957e9c4d175cc065f4277211fcb7d784fcee860 (diff)
downloadtalos-op-linux-987a6c0298260b7aa40702b349282554d6180e4b.tar.gz
talos-op-linux-987a6c0298260b7aa40702b349282554d6180e4b.zip
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/joystick/interact.c')
-rw-r--r--drivers/input/joystick/interact.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c
index 2478289aeeea..16fb19d1ca25 100644
--- a/drivers/input/joystick/interact.c
+++ b/drivers/input/joystick/interact.c
@@ -270,18 +270,14 @@ static int interact_connect(struct gameport *gameport, struct gameport_driver *d
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
for (i = 0; (t = interact_type[interact->type].abs[i]) >= 0; i++) {
- set_bit(t, input_dev->absbit);
- if (i < interact_type[interact->type].b8) {
- input_dev->absmin[t] = 0;
- input_dev->absmax[t] = 255;
- } else {
- input_dev->absmin[t] = -1;
- input_dev->absmax[t] = 1;
- }
+ if (i < interact_type[interact->type].b8)
+ input_set_abs_params(input_dev, t, 0, 255, 0, 0);
+ else
+ input_set_abs_params(input_dev, t, -1, 1, 0, 0);
}
for (i = 0; (t = interact_type[interact->type].btn[i]) >= 0; i++)
- set_bit(t, input_dev->keybit);
+ __set_bit(t, input_dev->keybit);
err = input_register_device(interact->dev);
if (err)
OpenPOWER on IntegriCloud