gpio: samsung: more generic pinctrl exclude ifdef
Subsystems (2)
PATCH 1/1 gpio: samsung: more generic pinctrl exclude ifdef
The exclude check should run any time when either the PINCTRL_SAMSUNG or PINCTRL_EXYNOS5440 are selected.
As the real check for the presence of a pinctrl driver is done via a dt lookup it's not necessary to specifiy every pinctrl option in the ifdef individually.
This fixes a breakage on s3c2416, when both the legacy and dt boards are selected.
---
Extracted from Tomasz pinctrl series, as it fixes a bug in the current 3.11 development.
drivers/gpio/gpio-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-samsung.c +1 -1
@@ -2949,7 +2949,7 @@ static __init int samsung_gpiolib_init(void)int i, nr_chips;int group =0 ; -#if defined(CONFIG_PINCTRL_EXYNOS ) || defined(CONFIG_PINCTRL_EXYNOS5440 ) +#if defined(CONFIG_PINCTRL_SAMSUNG ) || defined(CONFIG_PINCTRL_EXYNOS5440 )/* * This gpio driver includes support for device tree support and there * are platforms using it. In order to maintain compatibility with those
Signature · 1 line
1.7.10.4
PATCH 1/1 gpio: samsung: more generic pinctrl exclude ifdef
Hi Heiko,
Quoted 23 lines · On Tuesday 09 of July 2013 02:12:31 Heiko St?bner wrote:
The exclude check should run any time when either the
PINCTRL_SAMSUNGorPINCTRL_EXYNOS5440are selected.As the real check for the presence of a pinctrl driver is done via a dt lookup it's not necessary to specifiy every pinctrl option in the ifdef individually.
This fixes a breakage on s3c2416, when both the legacy and dt boards are selected.
Signed-off-by Heiko Stuebner <[email protected]>---
Extracted from Tomasz pinctrl series, as it fixes a bug in the current 3.11 development.drivers/gpio/gpio-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-samsung.c +0
-0
drivers/gpio/gpio-samsung.c static __init int samsung_gpiolib_init(void) · line 2955
Quoted 8 lines
drivers/gpio/gpio-samsung.c +1
-1@@ -2949,7 +2949,7 @@ static __init int samsung_gpiolib_init(void)int i, nr_chips;int group =0 ; -#if defined(CONFIG_PINCTRL_EXYNOS ) || defined(CONFIG_PINCTRL_EXYNOS5440 ) +#if defined(CONFIG_PINCTRL_SAMSUNG ) || defined(CONFIG_PINCTRL_EXYNOS5440 )/* * This gpio driver includes support for device tree support and there * are platforms using it. In order to maintain compatibility with those
I think we can simplify this even more now, since when booting with DT pinctrl driver is always used. What about just removing the whole check, including the ifdef and looking for compatible nodes and replacing them with:
if (of_have_populated_dt()) return -ENODEV;
Best regards,
Tomasz