From: K. Y. Srinivasan Date: Wed, 30 Nov 2011 16:52:23 +0000 (-0800) Subject: Staging: hv: mousevsc: Properly add the hid device X-Git-Tag: v3.3-rc1~152^2~101^2~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f75c0510784e9f6ce8808b01fb826d89d0ffbcd6;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Reported-by: Fuzhou Chen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index a28c549..66da8e3 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -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);