Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH 1/1] Drivers: hid: hid-hyperv.c: Set the hid drvdata correctly
@ 2012-05-16 20:50 K. Y. Srinivasan
  2012-05-17  8:03 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: K. Y. Srinivasan @ 2012-05-16 20:50 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, virtualization, ohering, jkosina
  Cc: K. Y. Srinivasan

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:

commit 07d9ab4f0e52cb2a383596e5ebbbd20232501393
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>
---
 drivers/hid/hid-hyperv.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 032e6c0..3d62781 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) {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-17  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16 20:50 [PATCH 1/1] Drivers: hid: hid-hyperv.c: Set the hid drvdata correctly K. Y. Srinivasan
2012-05-17  8:03 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox