linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: Define of_pinctrl_get() dummy for !PINCTRL
@ 2020-03-30  9:58 Thierry Reding
  2020-03-31 20:09 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2020-03-30  9:58 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, linux-kernel, Stephen Rothwell

From: Thierry Reding <treding@nvidia.com>

Currently, the of_pinctrl_get() dummy is only defined for !OF, which can
still cause build failures on configurations with OF enabled but PINCTRL
disabled. Make sure to define the dummy if either OF or PINCTRL are not
enabled.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 include/linux/pinctrl/pinctrl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 7ce23450a1cb..2aef59df93d7 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -186,7 +186,7 @@ extern int pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
 				const char *pin_group, const unsigned **pins,
 				unsigned *num_pins);
 
-#ifdef CONFIG_OF
+#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_PINCTRL)
 extern struct pinctrl_dev *of_pinctrl_get(struct device_node *np);
 #else
 static inline
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: Define of_pinctrl_get() dummy for !PINCTRL
  2020-03-30  9:58 [PATCH] pinctrl: Define of_pinctrl_get() dummy for !PINCTRL Thierry Reding
@ 2020-03-31 20:09 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2020-03-31 20:09 UTC (permalink / raw)
  To: Thierry Reding; +Cc: open list:GPIO SUBSYSTEM, linux-kernel, Stephen Rothwell

On Mon, Mar 30, 2020 at 11:58 AM Thierry Reding
<thierry.reding@gmail.com> wrote:

> From: Thierry Reding <treding@nvidia.com>
>
> Currently, the of_pinctrl_get() dummy is only defined for !OF, which can
> still cause build failures on configurations with OF enabled but PINCTRL
> disabled. Make sure to define the dummy if either OF or PINCTRL are not
> enabled.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-31 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30  9:58 [PATCH] pinctrl: Define of_pinctrl_get() dummy for !PINCTRL Thierry Reding
2020-03-31 20:09 ` Linus Walleij

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).