[alsa-devel] [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
If NO_DMA=y:
ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
Add a dependency on HAS_DMA to fix this.
Fixes: e2e6771c64625165 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support") Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org --- drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 39e3b345a6c84033..d976c64107c8e9fd 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -683,6 +683,7 @@ config STM32_DFSDM_CORE config STM32_DFSDM_ADC tristate "STMicroelectronics STM32 dfsdm adc" depends on (ARCH_STM32 && OF) || COMPILE_TEST + depends on HAS_DMA select STM32_DFSDM_CORE select REGMAP_MMIO select IIO_BUFFER_HW_CONSUMER
On Tue, Jan 30, 2018 at 02:21:46PM +0100, Geert Uytterhoeven wrote:
If NO_DMA=y:
ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
Add a dependency on HAS_DMA to fix this.
Once again I have to ask why we're doing this per driver and not having the few architectures that have this issue set something up.
Hi Mark,
On Tue, Jan 30, 2018 at 4:03 PM, Mark Brown broonie@kernel.org wrote:
On Tue, Jan 30, 2018 at 02:21:46PM +0100, Geert Uytterhoeven wrote:
If NO_DMA=y:
ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
Add a dependency on HAS_DMA to fix this.
Once again I have to ask why we're doing this per driver and not having the few architectures that have this issue set something up.
Because doing so would lead us to
depends on COMPILE_TEST || HAS_DMA
in many places. Is that any better?
I agree we could indeed use DMA dummies in cases where a driver uses:
depends on ARCH_FOO || ARCH_BAR || COMPILE_TEST depends on HAS_DMA
But we also have generic options like:
config ATA_BMDMA bool "ATA BMDMA support" depends on HAS_DMA
And even architecture-specific drivers for SoCs that may or not have DMA:
config HASH_DEV_STM32 tristate "Support for STM32 hash accelerators" depends on ARCH_STM32 depends on HAS_DMA
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
On Tue, Jan 30, 2018 at 04:31:24PM +0100, Geert Uytterhoeven wrote:
On Tue, Jan 30, 2018 at 4:03 PM, Mark Brown broonie@kernel.org wrote:
Once again I have to ask why we're doing this per driver and not having the few architectures that have this issue set something up.
Because doing so would lead us to
depends on COMPILE_TEST || HAS_DMA
in many places. Is that any better?
Honestly I'd just not have any dependency here, I'm not sure the DMA dependencies are really covering a good percentage of what's really likely to be found on these platforms.
participants (2)
-
Geert Uytterhoeven
-
Mark Brown