From 0a5f99cfff2297f6c350b7f54878cbbf1b1253d5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 30 Nov 2013 19:12:27 +0000 Subject: HID: kye: Fix missing break in kye_report_fixup() The change to support Genius Manticore Keyboard also changed behaviour for Genius Gx Imperator Keyboard, as there is no break between the cases. This is presumably a mistake. Reported by Coverity as CID 1134029. Fixes: 4a2c94c9b6c0 ('HID: kye: Add report fixup for Genius Manticore Keyboard') Signed-off-by: Ben Hutchings Signed-off-by: Jiri Kosina --- drivers/hid/hid-kye.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c index ecb5ca669e97..e77696367591 100644 --- a/drivers/hid/hid-kye.c +++ b/drivers/hid/hid-kye.c @@ -341,6 +341,7 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc, case USB_DEVICE_ID_GENIUS_GX_IMPERATOR: rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83, "Genius Gx Imperator Keyboard"); + break; case USB_DEVICE_ID_GENIUS_MANTICORE: rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104, "Genius Manticore Keyboard"); -- cgit v1.2.3 From d81cae806af428898f63391b5d7cd7ba0d87025d Mon Sep 17 00:00:00 2001 From: Srinivas Pandruvada Date: Thu, 5 Dec 2013 16:34:25 -0800 Subject: HID: hid-sensor-hub: fix duplicate sysfs entry error Fix kernel warning and failure to register sensor hub devices with MFD. Now many devices has in-built sensor hubs. So by default this HID hub, is properly parsed and register individual sensors as platform device using MFD framework. But if a second sensor hub is attached via USB, which has same sensors, it will result in kernel warning and failure to register MFD cell as the platform device sysfs file name will be same as created by in-built sensor hubs. This patch sets MFD cell id to PLATFORM_DEVID_AUTO. In this way there will never be duplicate sysfs file names. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina --- drivers/hid/hid-sensor-hub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index a184e1921c11..8af2d906db6c 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -572,6 +572,8 @@ static int sensor_hub_probe(struct hid_device *hdev, ret = -ENOMEM; goto err_free_names; } + sd->hid_sensor_hub_client_devs[ + sd->hid_sensor_client_cnt].id = PLATFORM_DEVID_AUTO; sd->hid_sensor_hub_client_devs[ sd->hid_sensor_client_cnt].name = name; sd->hid_sensor_hub_client_devs[ -- cgit v1.2.3