spi: pic32-sqi: Fix linker error, undefined reference to `bad_dma_ops'.
authorPurna Chandra Mandal <purna.mandal@microchip.com>
Fri, 13 May 2016 08:42:53 +0000 (14:12 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 13 May 2016 10:54:28 +0000 (11:54 +0100)
Even if DMA support is disabled code using DMA mapping APIs compiles fine,
but fails in linking.
-------
drivers/built-in.o: In function `ring_desc_ring_free':
spi-pic32-sqi.c:(.text+0x2cfbe0): undefined reference to `bad_dma_ops'
spi-pic32-sqi.c:(.text+0x2cfbe4): undefined reference to `bad_dma_ops'
drivers/built-in.o: In function `pic32_sqi_probe':
spi-pic32-sqi.c:(.text+0x2cfe48): undefined reference to `bad_dma_ops'
spi-pic32-sqi.c:(.text+0x2cfeb0): undefined reference to `bad_dma_ops'
spi-pic32-sqi.c:(.text+0x2cff38): undefined reference to `bad_dma_ops'
--------
Correct dependency by adding 'depends on HAS_DMA' in Kconfig.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/Kconfig

index 281ed5da4832249f013b3d9afb3bbb52f41ba9f7..0f507552ed3e80e89d31d8459d2d02aa6015305a 100644 (file)
@@ -445,6 +445,7 @@ config SPI_PIC32
 config SPI_PIC32_SQI
        tristate "Microchip PIC32 Quad SPI driver"
        depends on MACH_PIC32 || COMPILE_TEST
+       depends on HAS_DMA
        help
          SPI driver for PIC32 Quad SPI controller.