]> git.karo-electronics.de Git - linux-beck.git/commitdiff
HID: hv_mouse: Properly add the hid device
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 30 Nov 2011 16:52:23 +0000 (08:52 -0800)
committerJiri Kosina <jkosina@suse.cz>
Thu, 1 Dec 2011 19:53:57 +0000 (20:53 +0100)
We need to properly add the hid device to correctly initialize the sysfs state.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Fuzhou Chen <fuzhouch@microsoft.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-hyperv.c

index d503cbbe1e041ae83f9b79eea8ad518b53be2f1a..0c33ae9cf0f0e27549f3fd505e242dbb98b18be2 100644 (file)
@@ -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);