]> git.baikalelectronics.ru Git - kernel.git/commit
Input: hid-input - allow mapping unknown usages
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Sep 2010 02:36:56 +0000 (19:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Sep 2010 06:11:29 +0000 (23:11 -0700)
commit2f36947243fead7fc502256d0c7ba86414fb95a5
tree4420ba8623a9bb0ecef05875adf7d2da7941e862
parente65014d710bddc3ce6ece0a3a45cb55a0dcccc04
Input: hid-input - allow mapping unknown usages

Currently HID layer only allows to remap keycodes for known usages,
and responds with -EINVAL when user tries to map new usage code.
This precludes us form relying on udev/keymap for establishing correct
mappings and forces us to write dummy HID drivers responsible only for
setting up keymaps.

Let's allow remapping not only usages that have been set up as keys
(usage->type == EV_KEY) but also yet-unmapped usages (usage->type == 0).

Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/hid/hid-input.c