Skip to content

Commit 2c54c86

Browse files
jc-boydJiri Kosina
authored andcommitted
HID: hid-input: Simplify conditional expression
There are too many bangs in this conditional; therefore remove them while still maintaining the same logic. Signed-off-by: James C Boyd <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 09a5c34 commit 2c54c86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
11571157
return;
11581158

11591159
/* report the usage code as scancode if the key status has changed */
1160-
if (usage->type == EV_KEY && (!!test_bit(usage->code, input->key)) != value)
1160+
if (usage->type == EV_KEY && (!test_bit(usage->code, input->key)) == value)
11611161
input_event(input, EV_MSC, MSC_SCAN, usage->hid);
11621162

11631163
input_event(input, usage->type, usage->code, value);

0 commit comments

Comments
 (0)