summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-hyperv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-05-16 13:50:13 -0700
committerJiri Kosina <jkosina@suse.cz>2012-05-17 10:01:07 +0200
commitb565a3906a92fe87b162cdcd11268589a36dc6dd (patch)
treee9681f288f60415423bc214a430259e59588b0c1 /drivers/hid/hid-hyperv.c
parent16b79bb8ec4f20527525f8c063ae3e4d77388e97 (diff)
downloadlinux-rt-b565a3906a92fe87b162cdcd11268589a36dc6dd.tar.gz
HID: hyperv: Set the hid drvdata correctly
Set the hid drvdata prior to invoking hid_add_device() as hid_add_device() expects this state to be set. This bug was introduced in the recent hid changes that were made in 07d9ab4f0e52cb ("HID: hid-hyperv: Do not use hid_parse_report() directly"). Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-hyperv.c')
-rw-r--r--drivers/hid/hid-hyperv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 032e6c079826..3d62781b8993 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -516,11 +516,12 @@ static int mousevsc_probe(struct hv_device *device,
sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse");
+ hid_set_drvdata(hid_dev, device);
+
ret = hid_add_device(hid_dev);
if (ret)
goto probe_err1;
- hid_set_drvdata(hid_dev, device);
ret = hid_parse(hid_dev);
if (ret) {