Drivers: hid: hid-hyperv.c: Set the hid drvdata correctly
Subsystems (3)
PATCH 1/1 Drivers: hid: hid-hyperv.c: 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:
commit 07d9ab4f0e52cb2a383596e5ebbbd20232501393
HID: hid-hyperv: Do not use hid_parse_report() directly
Signed-off-by K. Y. Srinivasan <[email protected]>
Reviewed-by Haiyang Zhang <[email protected]>
--- drivers/hid/hid-hyperv.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/hid/hid-hyperv.c +2 -1
@@ -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) {
Signature · 1 line
1.7.4.1
Jiri Kosina
AppliedQuoted 21 lines · K. Y. Srinivasan
Set the hid drvdata prior to invoking
hid_add_device()ashid_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 usehid_parse_report()directlySigned-off-by K. Y. Srinivasan <[email protected]>Reviewed-by Haiyang Zhang <[email protected]>--- drivers/hid/hid-hyperv.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/hid/hid-hyperv.c +0
-0@@ -516,11 +516,12 @@ static int mousevsc_probe(struct hv_device *device,sprintf (hid_dev->name,"%s" ,"Microsoft Vmbus HID-compliant Mouse" );
drivers/hid/hid-hyperv.c static int mousevsc_probe(struct hv_device *device, · line 527
Quoted 10 lines
drivers/hid/hid-hyperv.c +2
-1+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) {
Applied, thanks KY.
Signature · 2 lines
Jiri Kosina SUSE Labs