Skip to content

Commit af43c40

Browse files
Dan CarpenterJiri Kosina
authored andcommitted
HID: rmi: fix some harmless BIT() mistakes
These defines are used like this: if (!(test_bit(RMI_STARTED, &hdata->flags))) So the intent was to use bits 0, 1 and 2 but because of the extra BIT() shifts we're actually using 1, 2 and 4. It's harmless because it's done consistently but static checkers will complain. Fixes: 9fb6bf0 ('HID: rmi: introduce RMI driver for Synaptics touchpads') Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent d0091f5 commit af43c40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/hid-rmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
#define RMI_SET_RMI_MODE_REPORT_ID 0x0f /* Feature Report */
3030

3131
/* flags */
32-
#define RMI_READ_REQUEST_PENDING BIT(0)
33-
#define RMI_READ_DATA_PENDING BIT(1)
34-
#define RMI_STARTED BIT(2)
32+
#define RMI_READ_REQUEST_PENDING 0
33+
#define RMI_READ_DATA_PENDING 1
34+
#define RMI_STARTED 2
3535

3636
/* device flags */
3737
#define RMI_DEVICE BIT(0)

0 commit comments

Comments
 (0)