linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PTCH -next] spi: fix spi-at91-usart.c build errors when PINCTRL is not set
@ 2018-11-29 22:34 Randy Dunlap
  2018-12-03 12:07 ` Applied "spi: fix spi-at91-usart.c build errors when PINCTRL is not set" to the spi tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-11-29 22:34 UTC (permalink / raw)
  To: LKML, linux-spi, Mark Brown; +Cc: Radu Pirea

From: Randy Dunlap <rdunlap@infradead.org>

Fix build errors when CONFIG_PINCTRL is not enabled.
The header file <linux/pinctrl/consumer.h> handles both CONFIG_PINCTRL
enabled and disabled cases.

  CC [M]  drivers/spi/spi-at91-usart.o
../drivers/spi/spi-at91-usart.c: In function 'at91_usart_spi_runtime_suspend':
../drivers/spi/spi-at91-usart.c:409:2: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration]
  pinctrl_pm_select_sleep_state(dev);
../drivers/spi/spi-at91-usart.c: In function 'at91_usart_spi_runtime_resume':
../drivers/spi/spi-at91-usart.c:419:2: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration]
  pinctrl_pm_select_default_state(dev);

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Radu Pirea <radu.pirea@microchip.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
---
 drivers/spi/spi-at91-usart.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20181129.orig/drivers/spi/spi-at91-usart.c
+++ linux-next-20181129/drivers/spi/spi-at91-usart.c
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of_gpio.h>
+#include <linux/pinctrl/consumer.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 

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

end of thread, other threads:[~2018-12-03 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-29 22:34 [PTCH -next] spi: fix spi-at91-usart.c build errors when PINCTRL is not set Randy Dunlap
2018-12-03 12:07 ` Applied "spi: fix spi-at91-usart.c build errors when PINCTRL is not set" to the spi tree Mark Brown

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