• Arnd Bergmann's avatar
    spi: spreadtrum adi: add hwspinlock dependency · e83f3742
    Arnd Bergmann authored and Mark Brown's avatar Mark Brown committed
    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 for the !COMPILE_TEST
    case, and allows compile-testing with HWSPINLOCK completely disabled,
    which will then rely on the existing stub API.
    
    Fixes: 7e2903cb
    
     ("spi: Add ADI driver for Spreadtrum platform")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
    e83f3742