From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] gpio: samsung: more generic pinctrl exclude ifdef
Date: Thu, 11 Jul 2013 12:23:13 +0200 [thread overview]
Message-ID: <2059841.SxvZmAMDu5@thinkpad> (raw)
In-Reply-To: <201307090212.31422.heiko@sntech.de>
Hi Heiko,
On Tuesday 09 of July 2013 02:12:31 Heiko St?bner wrote:
> 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.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> 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(-)
>
> diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
> index a1392f4..ceb7971 100644
> --- a/drivers/gpio/gpio-samsung.c
> +++ b/drivers/gpio/gpio-samsung.c
> @@ -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
prev parent reply other threads:[~2013-07-11 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 0:12 [PATCH] gpio: samsung: more generic pinctrl exclude ifdef Heiko Stübner
2013-07-11 10:23 ` Tomasz Figa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2059841.SxvZmAMDu5@thinkpad \
--to=tomasz.figa@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).