aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r--drivers/hid/hid-core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index e56f8d5d3a5..5746a5903bc 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1819,6 +1819,22 @@ void hid_unregister_driver(struct hid_driver *hdrv)
1819} 1819}
1820EXPORT_SYMBOL_GPL(hid_unregister_driver); 1820EXPORT_SYMBOL_GPL(hid_unregister_driver);
1821 1821
1822int hid_check_keys_pressed(struct hid_device *hid)
1823{
1824 struct hid_input *hidinput;
1825 int i;
1826
1827 list_for_each_entry(hidinput, &hid->inputs, list) {
1828 for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++)
1829 if (hidinput->input->key[i])
1830 return 1;
1831 }
1832
1833 return 0;
1834}
1835
1836EXPORT_SYMBOL_GPL(hid_check_keys_pressed);
1837
1822static int __init hid_init(void) 1838static int __init hid_init(void)
1823{ 1839{
1824 int ret; 1840 int ret;