diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-10 08:41:58 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-10 08:41:58 -0700 |
commit | 5fc0d36c00e6a2d0a9f2a0a815cff5b9a13b080d (patch) | |
tree | 819d3f27a826f29210398615f4918a4cd9154836 /drivers/input/misc | |
parent | d01d0756f75e7a5b4b43764ad45b83c4340f11d6 (diff) | |
parent | 6ac8a99b906b01eaceef0057dbee4a225a32c423 (diff) | |
download | op-kernel-dev-5fc0d36c00e6a2d0a9f2a0a815cff5b9a13b080d.zip op-kernel-dev-5fc0d36c00e6a2d0a9f2a0a815cff5b9a13b080d.tar.gz |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/adxl34x.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 29 |
2 files changed, 17 insertions, 13 deletions
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index e2ca017..de5900d 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -724,7 +724,6 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, pdata = &ac->pdata; ac->input = input_dev; - ac->disabled = true; ac->dev = dev; ac->irq = irq; ac->bops = bops; diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index b71eb55..bb53fd33 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -304,21 +304,25 @@ static int uinput_validate_absbits(struct input_dev *dev) if (!test_bit(cnt, dev->absbit)) continue; - if ((dev->absmax[cnt] <= dev->absmin[cnt])) { + if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) { printk(KERN_DEBUG "%s: invalid abs[%02x] min:%d max:%d\n", UINPUT_NAME, cnt, - dev->absmin[cnt], dev->absmax[cnt]); + input_abs_get_min(dev, cnt), + input_abs_get_max(dev, cnt)); retval = -EINVAL; break; } - if (dev->absflat[cnt] > (dev->absmax[cnt] - dev->absmin[cnt])) { + if (input_abs_get_flat(dev, cnt) > + input_abs_get_max(dev, cnt) - input_abs_get_min(dev, cnt)) { printk(KERN_DEBUG - "%s: absflat[%02x] out of range: %d " + "%s: abs_flat #%02x out of range: %d " "(min:%d/max:%d)\n", - UINPUT_NAME, cnt, dev->absflat[cnt], - dev->absmin[cnt], dev->absmax[cnt]); + UINPUT_NAME, cnt, + input_abs_get_flat(dev, cnt), + input_abs_get_min(dev, cnt), + input_abs_get_max(dev, cnt)); retval = -EINVAL; break; } @@ -343,7 +347,7 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu struct uinput_user_dev *user_dev; struct input_dev *dev; char *name; - int size; + int i, size; int retval; if (count != sizeof(struct uinput_user_dev)) @@ -387,11 +391,12 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu dev->id.product = user_dev->id.product; dev->id.version = user_dev->id.version; - size = sizeof(int) * ABS_CNT; - memcpy(dev->absmax, user_dev->absmax, size); - memcpy(dev->absmin, user_dev->absmin, size); - memcpy(dev->absfuzz, user_dev->absfuzz, size); - memcpy(dev->absflat, user_dev->absflat, size); + for (i = 0; i < ABS_CNT; i++) { + input_abs_set_max(dev, i, user_dev->absmax[i]); + input_abs_set_min(dev, i, user_dev->absmin[i]); + input_abs_set_fuzz(dev, i, user_dev->absfuzz[i]); + input_abs_set_flat(dev, i, user_dev->absflat[i]); + } /* check if absmin/absmax/absfuzz/absflat are filled as * told in Documentation/input/input-programming.txt */ |