diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-07 08:31:57 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-04-02 21:30:35 -0400 |
commit | 542a564d2ddbd2c37536b4dff8e45fa0fc239bcc (patch) | |
tree | eb01d3f1d9c43b5e9fe5b8d1f1da8d171c518def /drivers/pinctrl | |
parent | 48b1e3e80f742bff0f469245f2d05007af9af92e (diff) |
sh-pfc: Make function GPIOs support optional
The target is to get rid of function GPIOs completely. To reach this,
make function GPIOs support optional by skipping the function GPIO chip
registration if no function GPIOS are defined in SoC data.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index d7acb06d888c..7a54ec79518b 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c | |||
@@ -384,6 +384,9 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc) | |||
384 | } | 384 | } |
385 | 385 | ||
386 | /* Register the function GPIOs chip. */ | 386 | /* Register the function GPIOs chip. */ |
387 | if (pfc->info->nr_func_gpios == 0) | ||
388 | return 0; | ||
389 | |||
387 | chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup); | 390 | chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup); |
388 | if (IS_ERR(chip)) | 391 | if (IS_ERR(chip)) |
389 | return PTR_ERR(chip); | 392 | return PTR_ERR(chip); |