spi: SPI_FSL_DSPI should depend on HAS_DMA
diff mbox series

Message ID 1481718485-6966-1-git-send-email-geert@linux-m68k.org
State New, archived
Headers show
Series
  • spi: SPI_FSL_DSPI should depend on HAS_DMA
Related show

Commit Message

Geert Uytterhoeven Dec. 14, 2016, 12:28 p.m. UTC
If NO_DMA=y:

    ERROR: "bad_dma_ops" [drivers/spi/spi-fsl-dspi.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/spi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown Dec. 14, 2016, 2:37 p.m. UTC | #1
On Wed, Dec 14, 2016 at 01:28:05PM +0100, Geert Uytterhoeven wrote:
> If NO_DMA=y:

>     ERROR: "bad_dma_ops" [drivers/spi/spi-fsl-dspi.ko] undefined!

> Add a dependency on HAS_DMA to fix this.

Honestly I think we should just fix the architectures that don't support
DMA to provide compile out stubs for DMA, it seems like these
dependencies are more trouble than they're worth.
Geert Uytterhoeven Dec. 14, 2016, 2:40 p.m. UTC | #2
Hi Mark,

On Wed, Dec 14, 2016 at 3:37 PM, Mark Brown <broonie@kernel.org> wrote:
> On Wed, Dec 14, 2016 at 01:28:05PM +0100, Geert Uytterhoeven wrote:
>> If NO_DMA=y:
>
>>     ERROR: "bad_dma_ops" [drivers/spi/spi-fsl-dspi.ko] undefined!
>
>> Add a dependency on HAS_DMA to fix this.
>
> Honestly I think we should just fix the architectures that don't support
> DMA to provide compile out stubs for DMA, it seems like these
> dependencies are more trouble than they're worth.

Will that really help?

Then people will start adding "depends on HAS_DMA || COMPILE_TEST"
instead...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Mark Brown Dec. 14, 2016, 3:13 p.m. UTC | #3
On Wed, Dec 14, 2016 at 03:40:43PM +0100, Geert Uytterhoeven wrote:
> On Wed, Dec 14, 2016 at 3:37 PM, Mark Brown <broonie@kernel.org> wrote:
> > On Wed, Dec 14, 2016 at 01:28:05PM +0100, Geert Uytterhoeven wrote:

> > Honestly I think we should just fix the architectures that don't support
> > DMA to provide compile out stubs for DMA, it seems like these
> > dependencies are more trouble than they're worth.

> Will that really help?

> Then people will start adding "depends on HAS_DMA || COMPILE_TEST"
> instead...

No, I'm thinking just arrange things so that we don't need to depend on
HAS_DMA at all.

Patch
diff mbox series

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index cb6c7def29b26f15..f5c7915a23bc2417 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -378,6 +378,7 @@  config SPI_FSL_SPI
 config SPI_FSL_DSPI
 	tristate "Freescale DSPI controller"
 	select REGMAP_MMIO
+	depends on HAS_DMA
 	depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
 	help
 	  This enables support for the Freescale DSPI controller in master