Skip to contentSkip to conversation

Staging: hv: mousevsc: Properly add the hid device

PATCH In review K. Y. Srinivasan 2 participants 2 messages Nov 30, 2011 – Dec 1, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: hv: mousevsc: Properly add the hid device

We need to properly add the hid device to correctly initialize the sysfs state. While this patch is against the staging tree; Jiri, please pick up this patch as you merge the Hyper-V mouse driver.

---
 drivers/staging/hv/hv_mouse.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/staging/hv/hv_mouse.c +4 -0
index a28c549..66da8e3 100644
@@ -519,6 +519,10 @@ static int mousevsc_probe(struct hv_device *device,
 
 	sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse");
 
+	ret = hid_add_device(hid_dev);
+	if (ret)
+		goto probe_err1;
+
 	ret = hid_parse_report(hid_dev, input_dev->report_desc,
 				input_dev->report_desc_size);
 
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 16 lines · K. Y. Srinivasan

We need to properly add the hid device to correctly initialize the sysfs state. While this patch is against the staging tree; Jiri, please pick up this patch as you merge the Hyper-V mouse driver.

---
 drivers/staging/hv/hv_mouse.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/staging/hv/hv_mouse.c +0 -0
index a28c549..66da8e3 100644

drivers/staging/hv/hv_mouse.c static int mousevsc_probe(struct hv_device *device, · line 528

Quoted 10 lines
drivers/staging/hv/hv_mouse.c +4 -0
@@ -519,6 +519,10 @@ static int mousevsc_probe(struct hv_device *device,
 
 	sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse");
 
+	ret = hid_add_device(hid_dev);
+	if (ret)
+		goto probe_err1;
+
 	ret = hid_parse_report(hid_dev, input_dev->report_desc,
 				input_dev->report_desc_size);
 

I have refreshed the patch to apply to drivers/hid/hid-hyperv.c driver and applied. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs