diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 13:41:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 13:41:52 -0400 |
commit | fe445c6e2cb62a566e1a89f8798de11459975710 (patch) | |
tree | db1f2c0c19f488992fb5b9371476b4e7701c49a0 /drivers/input/joydev.c | |
parent | f63b759c44b0561c76a67894c734157df3313b42 (diff) | |
parent | d01d0756f75e7a5b4b43764ad45b83c4340f11d6 (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: (57 commits)
Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add()
Input: cy8ctmg110 - capacitive touchscreen support
Input: keyboard - also match braille-only keyboards
Input: adp5588-keys - export unused GPIO pins
Input: xpad - add product ID for Hori Fighting Stick EX2
Input: adxl34x - fix leak and use after free
Input: samsung-keypad - Add samsung keypad driver
Input: i8042 - reset keyboard controller wehen resuming from S2R
Input: synaptics - set min/max for finger width
Input: synaptics - only report width on hardware that supports it
Input: evdev - signal that device is writable in evdev_poll()
Input: mousedev - signal that device is writable in mousedev_poll()
Input: change input handlers to use bool when possible
Input: document the MT event slot protocol
Input: introduce MT event slots
Input: usbtouchscreen - implement reset_resume
Input: usbtouchscreen - implement runtime power management
Input: usbtouchscreen - implement basic suspend/resume
Input: Add ATMEL QT602240 touchscreen driver
Input: fix signedness warning in input_set_keycode()
...
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r-- | drivers/input/joydev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 34157bb97ed6..63834585c283 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -37,7 +37,6 @@ MODULE_LICENSE("GPL"); | |||
37 | #define JOYDEV_BUFFER_SIZE 64 | 37 | #define JOYDEV_BUFFER_SIZE 64 |
38 | 38 | ||
39 | struct joydev { | 39 | struct joydev { |
40 | int exist; | ||
41 | int open; | 40 | int open; |
42 | int minor; | 41 | int minor; |
43 | struct input_handle handle; | 42 | struct input_handle handle; |
@@ -46,6 +45,7 @@ struct joydev { | |||
46 | spinlock_t client_lock; /* protects client_list */ | 45 | spinlock_t client_lock; /* protects client_list */ |
47 | struct mutex mutex; | 46 | struct mutex mutex; |
48 | struct device dev; | 47 | struct device dev; |
48 | bool exist; | ||
49 | 49 | ||
50 | struct js_corr corr[ABS_CNT]; | 50 | struct js_corr corr[ABS_CNT]; |
51 | struct JS_DATA_SAVE_TYPE glue; | 51 | struct JS_DATA_SAVE_TYPE glue; |
@@ -760,7 +760,7 @@ static void joydev_remove_chrdev(struct joydev *joydev) | |||
760 | static void joydev_mark_dead(struct joydev *joydev) | 760 | static void joydev_mark_dead(struct joydev *joydev) |
761 | { | 761 | { |
762 | mutex_lock(&joydev->mutex); | 762 | mutex_lock(&joydev->mutex); |
763 | joydev->exist = 0; | 763 | joydev->exist = false; |
764 | mutex_unlock(&joydev->mutex); | 764 | mutex_unlock(&joydev->mutex); |
765 | } | 765 | } |
766 | 766 | ||
@@ -817,10 +817,9 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev, | |||
817 | init_waitqueue_head(&joydev->wait); | 817 | init_waitqueue_head(&joydev->wait); |
818 | 818 | ||
819 | dev_set_name(&joydev->dev, "js%d", minor); | 819 | dev_set_name(&joydev->dev, "js%d", minor); |
820 | joydev->exist = 1; | 820 | joydev->exist = true; |
821 | joydev->minor = minor; | 821 | joydev->minor = minor; |
822 | 822 | ||
823 | joydev->exist = 1; | ||
824 | joydev->handle.dev = input_get_device(dev); | 823 | joydev->handle.dev = input_get_device(dev); |
825 | joydev->handle.name = dev_name(&joydev->dev); | 824 | joydev->handle.name = dev_name(&joydev->dev); |
826 | joydev->handle.handler = handler; | 825 | joydev->handle.handler = handler; |