summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-06-21 17:15:57 +0400
committerArnd Bergmann <arnd@arndb.de>2013-06-21 17:15:57 +0400
commite7692e2cfd51324dad04273c97f025eaa3899aff (patch)
tree296e493278431c5213e4665c73f5f09bac7859de /drivers/gpio
parentd405534dcd1e17429befc0e38048c73a3affd2b9 (diff)
parente305062e94719ef543ae936dd56501b5a36406c6 (diff)
downloadlinux-e7692e2cfd51324dad04273c97f025eaa3899aff.tar.xz
Merge tag 'renesas-gpio-rcar2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers
From Simon Horman: Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11 Documentation enhancement and code cleanup by Laurent Pinchart. * tag 'renesas-gpio-rcar2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections gpio-rcar: Reference core gpio documentation in the DT bindings Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-rcar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index f3327533bfd5..6ec82f76f019 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -279,16 +279,13 @@ static struct irq_domain_ops gpio_rcar_irq_domain_ops = {
static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
{
struct gpio_rcar_config *pdata = p->pdev->dev.platform_data;
-#ifdef CONFIG_OF
struct device_node *np = p->pdev->dev.of_node;
struct of_phandle_args args;
int ret;
-#endif
- if (pdata)
+ if (pdata) {
p->config = *pdata;
-#ifdef CONFIG_OF
- else if (np) {
+ } else if (IS_ENABLED(CONFIG_OF) && np) {
ret = of_parse_phandle_with_args(np, "gpio-ranges",
"#gpio-range-cells", 0, &args);
p->config.number_of_pins = ret == 0 && args.args_count == 3
@@ -296,7 +293,6 @@ static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
: RCAR_MAX_GPIO_PER_BANK;
p->config.gpio_base = -1;
}
-#endif
if (p->config.number_of_pins == 0 ||
p->config.number_of_pins > RCAR_MAX_GPIO_PER_BANK) {