提交 07d9ab4f 编写于 作者: H Henrik Rydberg 提交者: Jiri Kosina

HID: hid-hyperv: Do not use hid_parse_report() directly

Upcoming changes will split the semantics of hid_parse_report()
and hid_parse(), so make sure drivers use hid_parse() in probe().
Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
Acked-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 73bebc8b
...@@ -430,6 +430,15 @@ static int mousevsc_connect_to_vsp(struct hv_device *device) ...@@ -430,6 +430,15 @@ static int mousevsc_connect_to_vsp(struct hv_device *device)
return ret; return ret;
} }
static int mousevsc_hid_parse(struct hid_device *hid)
{
struct hv_device *dev = hid_get_drvdata(hid);
struct mousevsc_dev *input_dev = hv_get_drvdata(dev);
return hid_parse_report(hid, input_dev->report_desc,
input_dev->report_desc_size);
}
static int mousevsc_hid_open(struct hid_device *hid) static int mousevsc_hid_open(struct hid_device *hid)
{ {
return 0; return 0;
...@@ -449,6 +458,7 @@ static void mousevsc_hid_stop(struct hid_device *hid) ...@@ -449,6 +458,7 @@ static void mousevsc_hid_stop(struct hid_device *hid)
} }
static struct hid_ll_driver mousevsc_ll_driver = { static struct hid_ll_driver mousevsc_ll_driver = {
.parse = mousevsc_hid_parse,
.open = mousevsc_hid_open, .open = mousevsc_hid_open,
.close = mousevsc_hid_close, .close = mousevsc_hid_close,
.start = mousevsc_hid_start, .start = mousevsc_hid_start,
...@@ -510,9 +520,9 @@ static int mousevsc_probe(struct hv_device *device, ...@@ -510,9 +520,9 @@ static int mousevsc_probe(struct hv_device *device,
if (ret) if (ret)
goto probe_err1; goto probe_err1;
ret = hid_parse_report(hid_dev, input_dev->report_desc, hid_set_drvdata(hid_dev, device);
input_dev->report_desc_size);
ret = hid_parse(hid_dev);
if (ret) { if (ret) {
hid_err(hid_dev, "parse failed\n"); hid_err(hid_dev, "parse failed\n");
goto probe_err2; goto probe_err2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册