From: K. Y. Srinivasan Date: Wed, 30 Nov 2011 16:52:23 +0000 (-0800) Subject: HID: hv_mouse: Properly add the hid device X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74c4fb058083b47571a4f76dcfce95085f2d8098;p=linux-beck.git HID: hv_mouse: Properly add the hid device We need to properly add the hid device to correctly initialize the sysfs state. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Reported-by: Fuzhou Chen Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index d503cbbe1e04..0c33ae9cf0f0 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -506,6 +506,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);