summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-03-06 01:06:24 +0100
committerJiri Kosina <jkosina@suse.cz>2018-03-06 15:19:13 +0100
commit04230f46025536896b15af22d8fae7fa519f9740 (patch)
treeae8171d01bc0230c80aa82e1ae22e24750df326c /drivers/hid
parentHID: uhid: use strlcpy() instead of strncpy() (diff)
downloadlinux-04230f46025536896b15af22d8fae7fa519f9740.tar.xz
linux-04230f46025536896b15af22d8fae7fa519f9740.zip
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-ntrig.c12
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,
switch (usage->hid) {
case 0xff000001:
/* Tag indicating the start of a multitouch group */
- nd->reading_mt = 1;
- nd->first_contact_touch = 0;
+ nd->reading_mt = true;
+ nd->first_contact_touch = false;
break;
case HID_DG_TIPSWITCH:
nd->tipswitch = value;
@@ -663,7 +663,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
* even if deactivation slack is turned off.
*/
nd->act_state = deactivate_slack - 1;
- nd->confidence = 0;
+ nd->confidence = false;
break;
}
@@ -679,7 +679,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
*/
if (nd->w < nd->min_width ||
nd->h < nd->min_height)
- nd->confidence = 0;
+ nd->confidence = false;
} else
break;
@@ -758,7 +758,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
if (!nd->reading_mt) /* Just to be sure */
break;
- nd->reading_mt = 0;
+ nd->reading_mt = false;
/*
@@ -910,7 +910,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
return -ENOMEM;
}
- nd->reading_mt = 0;
+ nd->reading_mt = false;
nd->min_width = 0;
nd->min_height = 0;
nd->activate_slack = activate_slack;