summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-logitech-dj.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-08-22 16:16:05 -0400
committerJiri Kosina <jkosina@suse.cz>2014-08-25 02:59:51 -0500
commit5abfe85c1d4694d5d4bbd13ecc166262b937adf0 (patch)
tree56c7163e23cd55f49bbcb128d2bfa60a46aa67d9 /drivers/hid/hid-logitech-dj.h
parent4ab25786c87eb20857bbb715c3ae34ec8fd6a214 (diff)
downloadop-kernel-dev-5abfe85c1d4694d5d4bbd13ecc166262b937adf0.zip
op-kernel-dev-5abfe85c1d4694d5d4bbd13ecc166262b937adf0.tar.gz
HID: logitech-dj: prevent false errors to be shown
Commit "HID: logitech: perform bounds checking on device_id early enough" unfortunately leaks some errors to dmesg which are not real ones: - if the report is not a DJ one, then there is not point in checking the device_id - the receiver (index 0) can also receive some notifications which can be safely ignored given the current implementation Move out the test regarding the report_id and also discards printing errors when the receiver got notified. Fixes: ad3e14d7c5268c2e24477c6ef54bbdf88add5d36 Cc: stable@vger.kernel.org Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-logitech-dj.h')
-rw-r--r--drivers/hid/hid-logitech-dj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-logitech-dj.h b/drivers/hid/hid-logitech-dj.h
index 4a40003..daeb0aa 100644
--- a/drivers/hid/hid-logitech-dj.h
+++ b/drivers/hid/hid-logitech-dj.h
@@ -27,6 +27,7 @@
#define DJ_MAX_PAIRED_DEVICES 6
#define DJ_MAX_NUMBER_NOTIFICATIONS 8
+#define DJ_RECEIVER_INDEX 0
#define DJ_DEVICE_INDEX_MIN 1
#define DJ_DEVICE_INDEX_MAX 6
OpenPOWER on IntegriCloud