All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] spi: fix spi-sprd-adi build errors when HWSPINLOCK=m and SPI_SPRD_ADI=y
@ 2017-09-23  1:47 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2017-09-23  1:47 UTC (permalink / raw)
  To: LKML, linux-spi, Mark Brown; +Cc: Baolin Wang

From: Randy Dunlap <rdunlap@infradead.org>

Fix build errors when CONFIG_HWSPINLOCK=m and SPI_SPRD_ADI=y.
That combination is not allowed.

This allows building with HWSPINLOCK and SPI_SPRD_ADI in any
combinations except for HWSPINLOCK=m and SPI_SPRD_ADI=y.

drivers/spi/spi-sprd-adi.o: In function `sprd_adi_remove':
spi-sprd-adi.c:(.text+0x13): undefined reference to `hwspin_lock_free'
drivers/spi/spi-sprd-adi.o: In function `sprd_adi_probe':
spi-sprd-adi.c:(.text+0xf5): undefined reference to `of_hwspin_lock_get_id'
spi-sprd-adi.c:(.text+0x107): undefined reference to `hwspin_lock_request_specific'
spi-sprd-adi.c:(.text+0x22e): undefined reference to `hwspin_lock_free'
drivers/spi/spi-sprd-adi.o: In function `sprd_adi_transfer_one':
spi-sprd-adi.c:(.text+0x2eb): undefined reference to `__hwspin_lock_timeout'
spi-sprd-adi.c:(.text+0x349): undefined reference to `__hwspin_unlock'
spi-sprd-adi.c:(.text+0x389): undefined reference to `__hwspin_lock_timeout'
spi-sprd-adi.c:(.text+0x3ee): undefined reference to `__hwspin_unlock'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Baolin Wang <Baolin.Wang@spreadtrum.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
---
 drivers/spi/Kconfig |    1 +
 1 file changed, 1 insertion(+)

v2: allow build with or without HWSPINLOCK, but restrict SPI_SPRD_ADI
to =m if HWSPINLOCK=m.

--- linux-next-20170921.orig/drivers/spi/Kconfig
+++ linux-next-20170921/drivers/spi/Kconfig
@@ -625,6 +625,7 @@ config SPI_SIRF
 config SPI_SPRD_ADI
 	tristate "Spreadtrum ADI controller"
 	depends on ARCH_SPRD || COMPILE_TEST
+	depends on HWSPINLOCK || HWSPINLOCK=n
 	help
 	  ADI driver based on SPI for Spreadtrum SoCs.
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-23  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-23  1:47 [PATCH v2] spi: fix spi-sprd-adi build errors when HWSPINLOCK=m and SPI_SPRD_ADI=y Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.