diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-08 12:07:24 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-08 12:37:45 -0400 |
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 91f622058bab..2baf32d72845 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -68,7 +68,7 @@ struct mousedev { | |||
68 | bool exist; | 68 | bool exist; |
69 | 69 | ||
70 | struct list_head mixdev_node; | 70 | struct list_head mixdev_node; |
71 | int mixdev_open; | 71 | bool opened_by_mixdev; |
72 | 72 | ||
73 | struct mousedev_hw_data packet; | 73 | struct mousedev_hw_data packet; |
74 | unsigned int pkt_count; | 74 | unsigned int pkt_count; |
@@ -469,11 +469,11 @@ static void mixdev_open_devices(void) | |||
469 | return; | 469 | return; |
470 | 470 | ||
471 | list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) { | 471 | list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) { |
472 | if (!mousedev->mixdev_open) { | 472 | if (!mousedev->opened_by_mixdev) { |
473 | if (mousedev_open_device(mousedev)) | 473 | if (mousedev_open_device(mousedev)) |
474 | continue; | 474 | continue; |
475 | 475 | ||
476 | mousedev->mixdev_open = 1; | 476 | mousedev->opened_by_mixdev = true; |
477 | } | 477 | } |
478 | } | 478 | } |
479 | } | 479 | } |
@@ -491,8 +491,8 @@ static void mixdev_close_devices(void) | |||
491 | return; | 491 | return; |
492 | 492 | ||
493 | list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) { | 493 | list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) { |
494 | if (mousedev->mixdev_open) { | 494 | if (mousedev->opened_by_mixdev) { |
495 | mousedev->mixdev_open = 0; | 495 | mousedev->opened_by_mixdev = false; |
496 | mousedev_close_device(mousedev); | 496 | mousedev_close_device(mousedev); |
497 | } | 497 | } |
498 | } | 498 | } |
@@ -935,7 +935,7 @@ static int mixdev_add_device(struct mousedev *mousedev) | |||
935 | if (retval) | 935 | if (retval) |
936 | goto out; | 936 | goto out; |
937 | 937 | ||
938 | mousedev->mixdev_open = 1; | 938 | mousedev->opened_by_mixdev = true; |
939 | } | 939 | } |
940 | 940 | ||
941 | get_device(&mousedev->dev); | 941 | get_device(&mousedev->dev); |
@@ -950,8 +950,8 @@ static void mixdev_remove_device(struct mousedev *mousedev) | |||
950 | { | 950 | { |
951 | mutex_lock(&mousedev_mix->mutex); | 951 | mutex_lock(&mousedev_mix->mutex); |
952 | 952 | ||
953 | if (mousedev->mixdev_open) { | 953 | if (mousedev->opened_by_mixdev) { |
954 | mousedev->mixdev_open = 0; | 954 | mousedev->opened_by_mixdev = false; |
955 | mousedev_close_device(mousedev); | 955 | mousedev_close_device(mousedev); |
956 | } | 956 | } |
957 | 957 | ||