* [PATCH] spi: spreadtrum adi: add hwspinlock dependency
@ 2017-10-05 12:11 Arnd Bergmann
2017-10-05 12:22 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-10-05 12:11 UTC (permalink / raw)
To: Mark Brown; +Cc: Baolin Wang, Arnd Bergmann, linux-spi, linux-kernel
With CONFIG_HWSPINLOCK=m, the new driver fails to link as a built-in driver:
drivers/spi/spi-sprd-adi.o: In function `sprd_adi_remove':
spi-sprd-adi.c:(.text+0x18): undefined reference to `hwspin_lock_free'
drivers/spi/spi-sprd-adi.o: In function `sprd_adi_probe':
spi-sprd-adi.c:(.text+0xfc): undefined reference to `of_hwspin_lock_get_id'
spi-sprd-adi.c:(.text+0x108): undefined reference to `hwspin_lock_request_specific'
spi-sprd-adi.c:(.text+0x268): undefined reference to `hwspin_lock_free'
This adds a hard Kconfig dependency on HWSPINLOCK, which is the
simplest solution since we don't care about building for the case
without HWSPINLOCK.
Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/spi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 2d9601e3a6ae..e2bd86826d44 100644
--- a/drivers/spi/Kconfig
+++ b/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
help
ADI driver based on SPI for Spreadtrum SoCs.
--
2.9.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: spreadtrum adi: add hwspinlock dependency
2017-10-05 12:11 [PATCH] spi: spreadtrum adi: add hwspinlock dependency Arnd Bergmann
@ 2017-10-05 12:22 ` Mark Brown
2017-10-05 20:40 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2017-10-05 12:22 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Baolin Wang, linux-spi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
On Thu, Oct 05, 2017 at 02:11:17PM +0200, Arnd Bergmann wrote:
> This adds a hard Kconfig dependency on HWSPINLOCK, which is the
> simplest solution since we don't care about building for the case
> without HWSPINLOCK.
Given that there are stubs for HWSPINLOCK it'd be good to also have an
|| COMPILE_TEST in there, otherwise what's the point in the stubs?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: spreadtrum adi: add hwspinlock dependency
2017-10-05 12:22 ` Mark Brown
@ 2017-10-05 20:40 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-10-05 20:40 UTC (permalink / raw)
To: Mark Brown; +Cc: Baolin Wang, linux-spi, Linux Kernel Mailing List
On Thu, Oct 5, 2017 at 2:22 PM, Mark Brown <broonie@kernel.org> wrote:
> On Thu, Oct 05, 2017 at 02:11:17PM +0200, Arnd Bergmann wrote:
>
>> This adds a hard Kconfig dependency on HWSPINLOCK, which is the
>> simplest solution since we don't care about building for the case
>> without HWSPINLOCK.
>
> Given that there are stubs for HWSPINLOCK it'd be good to also have an
> || COMPILE_TEST in there, otherwise what's the point in the stubs?
As far as I'm concerned, we can remove those stubs, it's easy enough
to compile-test with hwspinlock enabled, and the existing in-kernel
users all require hwspinlock anyway.
I've sent a second version now, please pick whichever you prefer.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-05 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 12:11 [PATCH] spi: spreadtrum adi: add hwspinlock dependency Arnd Bergmann
2017-10-05 12:22 ` Mark Brown
2017-10-05 20:40 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®