Skip to content

Commit

Permalink
HID: rmi: change logging level of log messages related to unexpected …
Browse files Browse the repository at this point in the history
…reports

Userspace tools may use hidraw to perform operations on the device from userspace while
hid-rmi is bound to the device. This can cause hid-rmi to print error messages when its
->raw_event() callback gets called as the reports pass through the HID stack. In this case
receiving responses which were not initiated by hid-rmi is not actually an error so the resulting
error messages are incorrect and misleading. This patch changes the log messages to debug so
that the messages can be turned on in the event that there is a problem and there is not
a userspace tool running.

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Andrew Duggan authored and Jiri Kosina committed Jul 29, 2014
1 parent 9e2c327 commit 01a5f8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-rmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static int rmi_input_event(struct hid_device *hdev, u8 *data, int size)
irq_mask |= hdata->f30.irq_mask;

if (data[1] & ~irq_mask)
hid_warn(hdev, "unknown intr source:%02lx %s:%d\n",
hid_dbg(hdev, "unknown intr source:%02lx %s:%d\n",
data[1] & ~irq_mask, __FILE__, __LINE__);

if (hdata->f11.interrupt_base < hdata->f30.interrupt_base) {
Expand All @@ -400,7 +400,7 @@ static int rmi_read_data_event(struct hid_device *hdev, u8 *data, int size)
struct rmi_data *hdata = hid_get_drvdata(hdev);

if (!test_bit(RMI_READ_REQUEST_PENDING, &hdata->flags)) {
hid_err(hdev, "no read request pending\n");
hid_dbg(hdev, "no read request pending\n");
return 0;
}

Expand Down

0 comments on commit 01a5f8a

Please sign in to comment.