LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-20  7:52 Amelie Delaunay
  2019-05-22  0:22 ` Randy Dunlap
  2019-05-22  5:48 ` Lee Jones
  0 siblings, 2 replies; 11+ messages in thread
From: Amelie Delaunay @ 2019-05-20  7:52 UTC (permalink / raw)
  To: Lee Jones, Linus Walleij, Alexandre Torgue, Maxime Coquelin
  Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-stm32,
	kbuild-all, Amelie Delaunay

When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
not exist:
drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
     pctl->gpio_chip.of_node = np;

Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
---
 drivers/pinctrl/pinctrl-stmfx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index eba872c..bb64aa0 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
 	pctl->gpio_chip.base = -1;
 	pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
 	pctl->gpio_chip.can_sleep = true;
+#ifdef CONFIG_OF_GPIO
 	pctl->gpio_chip.of_node = np;
+#endif
 	pctl->gpio_chip.need_valid_mask = true;
 
 	ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl);
-- 
2.7.4


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

end of thread, other threads:[~2019-05-24  7:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20  7:52 [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined Amelie Delaunay
2019-05-22  0:22 ` Randy Dunlap
2019-05-22  5:48 ` Lee Jones
2019-05-22  8:08   ` Amelie DELAUNAY
2019-05-22  8:41     ` Lee Jones
2019-05-22  9:20       ` Amelie DELAUNAY
2019-05-22  9:30         ` Lee Jones
2019-05-22 21:48         ` Linus Walleij
2019-05-23 14:11           ` Amelie DELAUNAY
2019-05-23 19:18             ` Linus Walleij
2019-05-24  7:27               ` Amelie DELAUNAY

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