]> git.baikalelectronics.ru Git - kernel.git/commit
Input: gpio-keys - fix check for disabling unsupported keys
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 6 Jan 2016 22:20:07 +0000 (14:20 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 10 Jan 2016 17:51:56 +0000 (09:51 -0800)
commite0b7c501731e9d9d00e9a11ca452540a9ae5730d
treeba1cabafbfacc1fca1797636546d0ca5a0b943d1
parentb9600fb2998f355ed6c9f53795a258b38bae9e1b
Input: gpio-keys - fix check for disabling unsupported keys

Commit c6e45e12322caa2c1c0245f81f948e8e4160cbce ("Input: gpio-keys - report
error when disabling unsupported key") tried let user know that they
attempted to disable an unsupported key, unfortunately the check is wrong
as it believes that all codes are invalid. Fix it by ensuring that keys
that we try to disable are subset of keys (or switches) that device
reports.

Fixes: c6e45e12322c ("Input: gpio-keys - report error when disabling unsupported key")
Reported-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/gpio_keys.c