Input: gpio_keys_polled - defer probing if GPIO probing is deferred
authorGabor Juhos <juhosg@openwrt.org>
Sun, 23 Dec 2012 09:54:58 +0000 (01:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:18:46 +0000 (09:18 -0800)
commitd9f5f4bc9a6ca2558588eee434027b0b2af2f121
tree2a2cc11bce7756d0c580043c87978e9b3ecc5300
parent459825b716b4f7f71d3d0a0da9c7e4192eb371c6
Input: gpio_keys_polled - defer probing if GPIO probing is deferred

commit d46329a708c1a3301e272a029266b69339c0877f upstream.

If GPIO probing is deferred, the driver tries to claim an invalid GPIO line
which leads to an error message like this:

  gpio-keys-polled buttons.2: unable to claim gpio 4294966779, err=-22
  gpio-keys-polled: probe of buttons.2 failed with error -22

We should make sure that error code returned by of_get_gpio_flags (including
-EPROBE_DEFER) is propagated up the stack.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/keyboard/gpio_keys_polled.c