Staging: hv: mousevsc: Properly add the hid device
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 30 Nov 2011 16:52:23 +0000 (08:52 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Dec 2011 17:57:32 +0000 (09:57 -0800)
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.

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: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hv_mouse.c

index a28c54983282975775b88e420afb175cb4dc0680..66da8e35d79957d565069c243f9a8d591a22bae4 100644 (file)
@@ -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);