]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mtd: nand: MTD_NAND_ECC_REALTEK should depend on HAS_DMA
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 8 Oct 2025 09:47:15 +0000 (11:47 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 22 Oct 2025 09:54:29 +0000 (11:54 +0200)
If CONFIG_NO_DMA=y:

    ERROR: modpost: "dma_free_pages" [drivers/mtd/nand/ecc-realtek.ko] undefined!
    ERROR: modpost: "dma_alloc_pages" [drivers/mtd/nand/ecc-realtek.ko] undefined!

The driver cannot function without DMA, hence fix this by adding a
dependency on HAS_DMA.

Fixes: 3148d0e5b1c5733d ("mtd: nand: realtek-ecc: Add Realtek external ECC engine support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/Kconfig

index 4a17271076bc1c4a64278e152c6aa5362b684889..1e57c8de857825d7ff87519b5b0d9a768aa293cc 100644 (file)
@@ -63,7 +63,7 @@ config MTD_NAND_ECC_MEDIATEK
 
 config MTD_NAND_ECC_REALTEK
         tristate "Realtek RTL93xx hardware ECC engine"
-        depends on HAS_IOMEM
+        depends on HAS_IOMEM && HAS_DMA
         depends on MACH_REALTEK_RTL || COMPILE_TEST
         select MTD_NAND_ECC
         help