aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/hid-core.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2009-03-30 15:14:53 +0200
committerJiri Kosina <jkosina@suse.cz>2009-03-30 15:14:53 +0200
commit621de593081524da2f0f7b060f5951b4155eb4a2 (patch)
treedcb1777094498496a3036b0e49546887e72d6a06 /drivers/hid/hid-core.c
parentafa5eb7c68689ced4284f01c96feed44a2d0a127 (diff)
parent6d77976800c3f29a0337fadcc9ddd79050fa5620 (diff)
Merge branch 'autosuspend' into for-next
Conflicts: drivers/hid/hid-core.c
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)
}
EXPORT_SYMBOL_GPL(hid_unregister_driver);
+int hid_check_keys_pressed(struct hid_device *hid)
+{
+ struct hid_input *hidinput;
+ int i;
+
+ list_for_each_entry(hidinput, &hid->inputs, list) {
+ for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++)
+ if (hidinput->input->key[i])
+ return 1;
+ }
+
+ return 0;
+}
+
+EXPORT_SYMBOL_GPL(hid_check_keys_pressed);
+
static int __init hid_init(void)
{
int ret;