spi: spreadtrum adi: add hwspinlock dependency
PATCH 1/1 spi: spreadtrum adi: add hwspinlock dependency
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.
--- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/spi/Kconfig +1 -0
@@ -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.
Signature · 6 lines
2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainerQuoted 3 lines · Arnd Bergmann
This adds a hard
Kconfigdependency 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?
Quoted 8 lines · Mark Brown
Quoted 3 lines · Arnd Bergmann
This adds a hard
Kconfigdependency 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_TESTin 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