Преглед на файлове

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>
Laurent Pinchart преди 12 години
родител
ревизия
542a564d2d
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      drivers/pinctrl/sh-pfc/gpio.c

+ 3 - 0
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);