diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-03-05 19:06:24 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-03-06 09:19:13 -0500 |
commit | 04230f46025536896b15af22d8fae7fa519f9740 (patch) | |
tree | ae8171d01bc0230c80aa82e1ae22e24750df326c | |
parent | 336fd4f5f25157e9e8bd50e898a1bbcd99eaea46 (diff) |
HID: hid-ntrig: use true and false for boolean values
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-ntrig.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 3d121d8ee980..43b1c7234316 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c | |||
@@ -591,8 +591,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
591 | switch (usage->hid) { | 591 | switch (usage->hid) { |
592 | case 0xff000001: | 592 | case 0xff000001: |
593 | /* Tag indicating the start of a multitouch group */ | 593 | /* Tag indicating the start of a multitouch group */ |
594 | nd->reading_mt = 1; | 594 | nd->reading_mt = true; |
595 | nd->first_contact_touch = 0; | 595 | nd->first_contact_touch = false; |
596 | break; | 596 | break; |
597 | case HID_DG_TIPSWITCH: | 597 | case HID_DG_TIPSWITCH: |
598 | nd->tipswitch = value; | 598 | nd->tipswitch = value; |
@@ -663,7 +663,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
663 | * even if deactivation slack is turned off. | 663 | * even if deactivation slack is turned off. |
664 | */ | 664 | */ |
665 | nd->act_state = deactivate_slack - 1; | 665 | nd->act_state = deactivate_slack - 1; |
666 | nd->confidence = 0; | 666 | nd->confidence = false; |
667 | break; | 667 | break; |
668 | } | 668 | } |
669 | 669 | ||
@@ -679,7 +679,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
679 | */ | 679 | */ |
680 | if (nd->w < nd->min_width || | 680 | if (nd->w < nd->min_width || |
681 | nd->h < nd->min_height) | 681 | nd->h < nd->min_height) |
682 | nd->confidence = 0; | 682 | nd->confidence = false; |
683 | } else | 683 | } else |
684 | break; | 684 | break; |
685 | 685 | ||
@@ -758,7 +758,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
758 | if (!nd->reading_mt) /* Just to be sure */ | 758 | if (!nd->reading_mt) /* Just to be sure */ |
759 | break; | 759 | break; |
760 | 760 | ||
761 | nd->reading_mt = 0; | 761 | nd->reading_mt = false; |
762 | 762 | ||
763 | 763 | ||
764 | /* | 764 | /* |
@@ -910,7 +910,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
910 | return -ENOMEM; | 910 | return -ENOMEM; |
911 | } | 911 | } |
912 | 912 | ||
913 | nd->reading_mt = 0; | 913 | nd->reading_mt = false; |
914 | nd->min_width = 0; | 914 | nd->min_width = 0; |
915 | nd->min_height = 0; | 915 | nd->min_height = 0; |
916 | nd->activate_slack = activate_slack; | 916 | nd->activate_slack = activate_slack; |