aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joydev.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-16 02:27:36 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-16 02:52:33 -0400
commit20da92de8ec3c1d4ba7e5aca322d38b6ce634932 (patch)
tree2349309cc452763e649c75f94bf00c327376f8d2 /drivers/input/joydev.c
parent72c8a94a585afea1f45aa8c4f6938ed6d05be57a (diff)
Input: change input handlers to use bool when possible
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r--drivers/input/joydev.c7
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
39struct joydev { 39struct 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)
760static void joydev_mark_dead(struct joydev *joydev) 760static 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;