1 From d32c4e58545f17caaa854415f854691e32d42075 Mon Sep 17 00:00:00 2001
2 From: Geert Uytterhoeven <geert+renesas@glider.be>
3 Date: Wed, 26 Mar 2025 15:22:19 +0100
4 Subject: [PATCH] spi: SPI_QPIC_SNAND should be tristate and depend on MTD
6 SPI_QPIC_SNAND is the only driver that selects MTD instead of depending
7 on it, which could lead to circular dependencies. Moreover, as
8 SPI_QPIC_SNAND is bool, this forces MTD (and various related symbols) to
9 be built-in, as can be seen in an allmodconfig kernel.
11 Except for a missing semicolon, there is no reason why SPI_QPIC_SNAND
12 cannot be tristate; all MODULE_*() boilerplate is already present.
13 Hence make SPI_QPIC_SNAND tristate, let it depend on MTD, and add the
16 Fixes: 7304d1909080ef0c ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
17 Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
18 Link: https://patch.msgid.link/b63db431cbf35223a4400e44c296293d32c4543c.1742998909.git.geert+renesas@glider.be
19 Signed-off-by: Mark Brown <broonie@kernel.org>
21 drivers/spi/Kconfig | 4 ++--
22 drivers/spi/spi-qpic-snand.c | 2 +-
23 2 files changed, 3 insertions(+), 3 deletions(-)
25 --- a/drivers/spi/Kconfig
26 +++ b/drivers/spi/Kconfig
27 @@ -899,9 +899,9 @@ config SPI_QCOM_QSPI
28 QSPI(Quad SPI) driver for Qualcomm QSPI controller.
31 - bool "QPIC SNAND controller"
32 + tristate "QPIC SNAND controller"
33 depends on ARCH_QCOM || COMPILE_TEST
37 QPIC_SNAND (QPIC SPI NAND) driver for Qualcomm QPIC controller.
38 QPIC controller supports both parallel nand and serial nand.
39 --- a/drivers/spi/spi-qpic-snand.c
40 +++ b/drivers/spi/spi-qpic-snand.c
41 @@ -1614,7 +1614,7 @@ static const struct of_device_id qcom_sn
42 .data = &ipq9574_snandc_props,
47 MODULE_DEVICE_TABLE(of, qcom_snandc_of_match);
49 static struct platform_driver qcom_spi_driver = {