]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spi: SPI_QPIC_SNAND should be tristate and depend on MTD
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 26 Mar 2025 14:22:19 +0000 (15:22 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 26 Mar 2025 16:21:32 +0000 (16:21 +0000)
SPI_QPIC_SNAND is the only driver that selects MTD instead of depending
on it, which could lead to circular dependencies.  Moreover, as
SPI_QPIC_SNAND is bool, this forces MTD (and various related symbols) to
be built-in, as can be seen in an allmodconfig kernel.

Except for a missing semicolon, there is no reason why SPI_QPIC_SNAND
cannot be tristate; all MODULE_*() boilerplate is already present.
Hence make SPI_QPIC_SNAND tristate, let it depend on MTD, and add the
missing semicolon.

Fixes: 7304d1909080ef0c ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/b63db431cbf35223a4400e44c296293d32c4543c.1742998909.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/Kconfig
drivers/spi/spi-qpic-snand.c

index f40c282d4d633ef96799a0da11f432b812cd4c2e..ed38f6d41f470dc7f0694a9f3690087770d95ad7 100644 (file)
@@ -937,9 +937,9 @@ config SPI_QCOM_QSPI
          QSPI(Quad SPI) driver for Qualcomm QSPI controller.
 
 config SPI_QPIC_SNAND
-       bool "QPIC SNAND controller"
+       tristate "QPIC SNAND controller"
        depends on ARCH_QCOM || COMPILE_TEST
-       select MTD
+       depends on MTD
        help
          QPIC_SNAND (QPIC SPI NAND) driver for Qualcomm QPIC controller.
          QPIC controller supports both parallel nand and serial nand.
index fbba7741a9bf336deed1c07eab8d5a94204878d7..17eb67e19132612c4c1a84848fa6f7432b1130a8 100644 (file)
@@ -1614,7 +1614,7 @@ static const struct of_device_id qcom_snandc_of_match[] = {
                .data = &ipq9574_snandc_props,
        },
        {}
-}
+};
 MODULE_DEVICE_TABLE(of, qcom_snandc_of_match);
 
 static struct platform_driver qcom_spi_driver = {