From: Grygorii Strashko Date: Fri, 22 May 2015 14:35:52 +0000 (+0300) Subject: gpio: omap: rework omap_gpio_irq_startup to handle current pin state properly X-Git-Tag: omap-for-v4.3/legacy-v2-signed~191^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=121dcb760426ca67ee90a8b2db6a75eee010f8e3;p=pandora-kernel.git gpio: omap: rework omap_gpio_irq_startup to handle current pin state properly The omap_gpio_irq_startup() can be called at time when: - corresponding GPIO has been requested already and in this case it has to be configured as input already. If not - return with -EINVAL and do not try to re-configure it as it could be unsafe. - corresponding GPIO is free: reconfigure GPIO as input. In addition, call omap_enable_gpio_module directly as all needed checks are already present inside it. Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij --- Reading git-diff-tree failed