projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
HID: uhid: allow poll()'ing on uhid devices
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
hid
/
hid-input.c
diff --git
a/drivers/hid/hid-input.c
b/drivers/hid/hid-input.c
index 6559e2e3364ec9cf5a4f56e4f112b47c85a2ce7a..1483c8296d57cb6b8a5463a59f1341412fba9b40 100644
(file)
--- a/
drivers/hid/hid-input.c
+++ b/
drivers/hid/hid-input.c
@@
-971,6
+971,9
@@
int hidinput_connect(struct hid_device *hid, unsigned int force)
* UGCI) cram a lot of unrelated inputs into the
* same interface. */
hidinput->report = report;
* UGCI) cram a lot of unrelated inputs into the
* same interface. */
hidinput->report = report;
+ if (hid->driver->input_register &&
+ hid->driver->input_register(hid, hidinput))
+ goto out_cleanup;
if (input_register_device(hidinput->input))
goto out_cleanup;
hidinput = NULL;
if (input_register_device(hidinput->input))
goto out_cleanup;
hidinput = NULL;
@@
-978,6
+981,10
@@
int hidinput_connect(struct hid_device *hid, unsigned int force)
}
}
}
}
+ if (hidinput && hid->driver->input_register &&
+ hid->driver->input_register(hid, hidinput))
+ goto out_cleanup;
+
if (hidinput && input_register_device(hidinput->input))
goto out_cleanup;
if (hidinput && input_register_device(hidinput->input))
goto out_cleanup;