From: Guenter Roeck Date: Fri, 22 Nov 2013 17:26:01 +0000 (-0800) Subject: extcon: gpio: Request gpio pin before modifying its state X-Git-Tag: v3.14-rc1~152^2~4^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4288d9b8edcec7289e00eecdad44f14c9ea1ba0e;p=pandora-kernel.git extcon: gpio: Request gpio pin before modifying its state Commit 338de0ca (extcon: gpio: Use gpio driver/chip debounce if supported) introduced a call to gpio_set_debounce() before actually requesting the respective gpio pin from the gpio subsystem. The gpio subsystem expects that a gpio pin was requested before modifying its state. Not doing so results in a warning from gpiolib, and the gpio pin is auto-requested. This in turn causes the subsequent devm_gpio_request_one() to fail. So devm_gpio_request_one() must be called prior to calling gpio_set_debounce(). Signed-off-by: Guenter Roeck Acked-by: MyungJoo Ham Signed-off-by: Chanwoo Choi --- Reading git-diff-tree failed