diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-08 09:07:24 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-08 09:37:45 -0700 |
commit | 3376b8b753bcc300c4f1b170d01c2fb472889a3d (patch) | |
tree | fd9cd5d3e152cb7bdf9502c20637b2aefcd97a2d /drivers/input | |
parent | 1c74585eccbef8fbdac494bfb2abb768aab886d3 (diff) |
Input: mousedev - rename mixdev_open to opened_by_mixdev
Do the rename to make the logic more clear and also change it to bool
while at it.
Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/mousedev.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 91f622058ba..2baf32d7284 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -68,7 +68,7 @@ struct mousedev { bool exist; struct list_head mixdev_node; - int mixdev_open; + bool opened_by_mixdev; struct mousedev_hw_data packet; unsigned int pkt_count; @@ -469,11 +469,11 @@ static void mixdev_open_devices(void) return; list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) { - if (!mousedev->mixdev_open) { + if (!mousedev->opened_by_mixdev) { if (mousedev_open_device(mousedev)) continue; - mousedev->mixdev_open = 1; + mousedev->opened_by_mixdev = true; } } } @@ -491,8 +491,8 @@ static void mixdev_close_devices(void) return; list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) { - if (mousedev->mixdev_open) { - mousedev->mixdev_open = 0; + if (mousedev->opened_by_mixdev) { + mousedev->opened_by_mixdev = false; mousedev_close_device(mousedev); } } @@ -935,7 +935,7 @@ static int mixdev_add_device(struct mousedev *mousedev) if (retval) goto out; - mousedev->mixdev_open = 1; + mousedev->opened_by_mixdev = true; } get_device(&mousedev->dev); @@ -950,8 +950,8 @@ static void mixdev_remove_device(struct mousedev *mousedev) { mutex_lock(&mousedev_mix->mutex); - if (mousedev->mixdev_open) { - mousedev->mixdev_open = 0; + if (mousedev->opened_by_mixdev) { + mousedev->opened_by_mixdev = false; mousedev_close_device(mousedev); } |