From: Laurent Pinchart Date: Thu, 7 Mar 2013 13:31:57 +0000 (+0100) Subject: sh-pfc: Make function GPIOs support optional X-Git-Tag: accepted/tizen/common/20141203.182822~2309^2~4^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=542a564d2ddbd2c37536b4dff8e45fa0fc239bcc;p=platform%2Fkernel%2Flinux-arm64.git 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 Acked-by: Linus Walleij Signed-off-by: Simon Horman --- diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index d7acb06..7a54ec7 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) } /* Register the function GPIOs chip. */ + if (pfc->info->nr_func_gpios == 0) + return 0; + chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup); if (IS_ERR(chip)) return PTR_ERR(chip);