Commit 04230f46 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Jiri Kosina

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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 336fd4f5
...@@ -591,8 +591,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, ...@@ -591,8 +591,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
switch (usage->hid) { switch (usage->hid) {
case 0xff000001: case 0xff000001:
/* Tag indicating the start of a multitouch group */ /* Tag indicating the start of a multitouch group */
nd->reading_mt = 1; nd->reading_mt = true;
nd->first_contact_touch = 0; nd->first_contact_touch = false;
break; break;
case HID_DG_TIPSWITCH: case HID_DG_TIPSWITCH:
nd->tipswitch = value; nd->tipswitch = value;
...@@ -663,7 +663,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, ...@@ -663,7 +663,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
* even if deactivation slack is turned off. * even if deactivation slack is turned off.
*/ */
nd->act_state = deactivate_slack - 1; nd->act_state = deactivate_slack - 1;
nd->confidence = 0; nd->confidence = false;
break; break;
} }
...@@ -679,7 +679,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, ...@@ -679,7 +679,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
*/ */
if (nd->w < nd->min_width || if (nd->w < nd->min_width ||
nd->h < nd->min_height) nd->h < nd->min_height)
nd->confidence = 0; nd->confidence = false;
} else } else
break; break;
...@@ -758,7 +758,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, ...@@ -758,7 +758,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
if (!nd->reading_mt) /* Just to be sure */ if (!nd->reading_mt) /* Just to be sure */
break; 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) ...@@ -910,7 +910,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
return -ENOMEM; return -ENOMEM;
} }
nd->reading_mt = 0; nd->reading_mt = false;
nd->min_width = 0; nd->min_width = 0;
nd->min_height = 0; nd->min_height = 0;
nd->activate_slack = activate_slack; nd->activate_slack = activate_slack;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment