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)
commit8679ee4204cfd5cf78b996508ccadc1ec6130f1a
treeba1cabafbfacc1fca1797636546d0ca5a0b943d1
parent35f8679f577ae5673a778598bcbe7b45cbec8923
Input: gpio-keys - fix check for disabling unsupported keys

Commit 4ea14a53d8f881034fa9e186653821c4e3d9a8fb ("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: 4ea14a53d8f8 ("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