Skip to content

Commit

Permalink
HID: rmi: fix some harmless BIT() mistakes
Browse files Browse the repository at this point in the history
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 <dan.carpenter@oracle.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Dan Carpenter authored and Jiri Kosina committed May 18, 2015
1 parent d0091f5 commit af43c40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/hid/hid-rmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#define RMI_SET_RMI_MODE_REPORT_ID 0x0f /* Feature Report */

/* flags */
#define RMI_READ_REQUEST_PENDING BIT(0)
#define RMI_READ_DATA_PENDING BIT(1)
#define RMI_STARTED BIT(2)
#define RMI_READ_REQUEST_PENDING 0
#define RMI_READ_DATA_PENDING 1
#define RMI_STARTED 2

/* device flags */
#define RMI_DEVICE BIT(0)
Expand Down

0 comments on commit af43c40

Please sign in to comment.