From: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
To: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Pratyush Yadav" <pratyush@kernel.org>,
"Michael Walle" <mwalle@kernel.org>,
"Takahiro Kuwano" <takahiro.kuwano@infineon.com>,
"Vladimir Zapolskiy" <vz@mleia.com>,
"Robert Jarzmik" <robert.jarzmik@free.fr>,
"Alexander Usyskin" <alexander.usyskin@intel.com>,
"Joern Engel" <joern@lazybastard.org>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
"Shrikanth Hegde" <sshegde@linux.ibm.com>,
"Michal Simek" <michal.simek@amd.com>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Brian Norris" <computersforpeace@gmail.com>,
"Kamal Dasu" <kamal.dasu@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"William Zhang" <william.zhang@broadcom.com>,
"Anand Gore" <anand.gore@broadcom.com>,
"Kursad Oney" <kursad.oney@broadcom.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>, "Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Han Xu" <han.xu@nxp.com>, "Paul Cercueil" <paul@crapouillou.net>,
"Harvey Hunt" <harveyhuntnexus@gmail.com>,
"Keguang Zhang" <keguang.zhang@gmail.com>,
"Piotr Wojtaszczyk" <piotr.wojtaszczyk@timesys.com>,
"Liang Yang" <liang.yang@amlogic.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Chen-Yu Tsai" <wens@kernel.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
"Stefan Agner" <stefan@agner.ch>, "Lucas Stach" <dev@lynxeye.de>,
"Thierry Reding" <thierry.reding@kernel.org>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Jacky Huang" <ychuang3@nuvoton.com>,
"Shan-Chun Hung" <schung@nuvoton.com>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Linus Walleij" <linusw@kernel.org>,
"Kyungmin Park" <kyungmin.park@samsung.com>
Cc: linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev,
linux-mips@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org,
"Pawel Zalewski" <pzalewski@thegoodpenguin.co.uk>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Subject: [PATCH v2 02/10] mtd: spi-nor: Use named initializers for spi_device_id
Date: Tue, 01 Dec 2026 16:18:48 +0000 [thread overview]
Message-ID: <20261201-acpi-mtd-v2-2-e3323514e85b@thegoodpenguin.co.uk> (raw)
In-Reply-To: <20261201-acpi-mtd-v2-0-e3323514e85b@thegoodpenguin.co.uk>
Use a designated initializer for the spi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base.
Put every list item on a new line and unify the list terminator to have
a single space between the brackets and no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
drivers/mtd/spi-nor/core.c | 77 +++++++++++++++++++++++++++++++++-------------
1 file changed, 55 insertions(+), 22 deletions(-)
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index a04d22d2e2e1..a76c669000d8 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3662,42 +3662,75 @@ static const struct spi_device_id spi_nor_dev_ids[] = {
* hack around the fact that the SPI core does not provide uevent
* matching for .of_match_table
*/
- {"spi-nor"},
+ { .name = "spi-nor" },
/*
* Entries not used in DTs that should be safe to drop after replacing
* them with "spi-nor" in platform data.
*/
- {"s25sl064a"}, {"w25x16"}, {"m25p10"}, {"m25px64"},
+ { .name = "s25sl064a" },
+ { .name = "w25x16" },
+ { .name = "m25p10" },
+ { .name = "m25px64" },
/*
* Entries that were used in DTs without "jedec,spi-nor" fallback and
* should be kept for backward compatibility.
*/
- {"at25df321a"}, {"at25df641"}, {"at26df081a"},
- {"mx25l4005a"}, {"mx25l1606e"}, {"mx25l6405d"}, {"mx25l12805d"},
- {"mx25l25635e"},{"mx66l51235l"},
- {"n25q064"}, {"n25q128a11"}, {"n25q128a13"}, {"n25q512a"},
- {"s25fl256s1"}, {"s25fl512s"}, {"s25sl12801"}, {"s25fl008k"},
- {"s25fl064k"},
- {"sst25vf040b"},{"sst25vf016b"},{"sst25vf032b"},{"sst25wf040"},
- {"m25p40"}, {"m25p80"}, {"m25p16"}, {"m25p32"},
- {"m25p64"}, {"m25p128"},
- {"w25x80"}, {"w25x32"}, {"w25q32"}, {"w25q32dw"},
- {"w25q80bl"}, {"w25q128"}, {"w25q256"},
+ { .name = "at25df321a" },
+ { .name = "at25df641" },
+ { .name = "at26df081a" },
+ { .name = "mx25l4005a" },
+ { .name = "mx25l1606e" },
+ { .name = "mx25l6405d" },
+ { .name = "mx25l12805d" },
+ { .name = "mx25l25635e" },
+ { .name = "mx66l51235l" },
+ { .name = "n25q064" },
+ { .name = "n25q128a11" },
+ { .name = "n25q128a13" },
+ { .name = "n25q512a" },
+ { .name = "s25fl256s1" },
+ { .name = "s25fl512s" },
+ { .name = "s25sl12801" },
+ { .name = "s25fl008k" },
+ { .name = "s25fl064k" },
+ { .name = "sst25vf040b" },
+ { .name = "sst25vf016b" },
+ { .name = "sst25vf032b" },
+ { .name = "sst25wf040" },
+ { .name = "m25p40" },
+ { .name = "m25p80" },
+ { .name = "m25p16" },
+ { .name = "m25p32" },
+ { .name = "m25p64" },
+ { .name = "m25p128" },
+ { .name = "w25x80" },
+ { .name = "w25x32" },
+ { .name = "w25q32" },
+ { .name = "w25q32dw" },
+ { .name = "w25q80bl" },
+ { .name = "w25q128" },
+ { .name = "w25q256" },
/* Flashes that can't be detected using JEDEC */
- {"m25p05-nonjedec"}, {"m25p10-nonjedec"}, {"m25p20-nonjedec"},
- {"m25p40-nonjedec"}, {"m25p80-nonjedec"}, {"m25p16-nonjedec"},
- {"m25p32-nonjedec"}, {"m25p64-nonjedec"}, {"m25p128-nonjedec"},
+ { .name = "m25p05-nonjedec" },
+ { .name = "m25p10-nonjedec" },
+ { .name = "m25p20-nonjedec" },
+ { .name = "m25p40-nonjedec" },
+ { .name = "m25p80-nonjedec" },
+ { .name = "m25p16-nonjedec" },
+ { .name = "m25p32-nonjedec" },
+ { .name = "m25p64-nonjedec" },
+ { .name = "m25p128-nonjedec" },
/* Everspin MRAMs (non-JEDEC) */
- { "mr25h128" }, /* 128 Kib, 40 MHz */
- { "mr25h256" }, /* 256 Kib, 40 MHz */
- { "mr25h10" }, /* 1 Mib, 40 MHz */
- { "mr25h40" }, /* 4 Mib, 40 MHz */
+ { .name = "mr25h128" }, /* 128 Kib, 40 MHz */
+ { .name = "mr25h256" }, /* 256 Kib, 40 MHz */
+ { .name = "mr25h10" }, /* 1 Mib, 40 MHz */
+ { .name = "mr25h40" }, /* 4 Mib, 40 MHz */
- { },
+ { }
};
MODULE_DEVICE_TABLE(spi, spi_nor_dev_ids);
@@ -3707,7 +3740,7 @@ static const struct of_device_id spi_nor_of_table[] = {
* JEDEC READ ID opcode (0x9F). Use this, if possible.
*/
{ .compatible = "jedec,spi-nor" },
- { /* sentinel */ },
+ { }
};
MODULE_DEVICE_TABLE(of, spi_nor_of_table);
--
2.53.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-12-01 16:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 16:18 [PATCH v2 00/10] mtd: use desginated initializers in *_device_id arrays Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 01/10] mtd: maps: pismo: Use named initializers for i2c_device_id Pawel Zalewski
2026-12-01 16:18 ` Pawel Zalewski [this message]
2026-12-01 16:18 ` [PATCH v2 03/10] mtd: maps: int0800: Use named initializers for acpi_device_id Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 04/10] mtd: spi-nor: Unify of_device_id list terminator and padding Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 05/10] mtd: devices: Unify list terminator for *_device_id lists Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 06/10] mtd: nand: raw: " Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 07/10] mtd: hyperbus: " Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 08/10] mtd: maps: Unify list terminator for of_device_id lists Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 09/10] mtd: nand: Unify list terminator for *_device_id lists Pawel Zalewski
2026-12-01 16:18 ` [PATCH v2 10/10] mtd: parsers: Unify list terminator for of_device_id lists Pawel Zalewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201-acpi-mtd-v2-2-e3323514e85b@thegoodpenguin.co.uk \
--to=pzalewski@thegoodpenguin.co.uk \
--cc=Frank.Li@nxp.com \
--cc=alexander.usyskin@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=anand.gore@broadcom.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=chleroy@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=computersforpeace@gmail.com \
--cc=dev@lynxeye.de \
--cc=festevam@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=han.xu@nxp.com \
--cc=harveyhuntnexus@gmail.com \
--cc=heiko@sntech.de \
--cc=imx@lists.linux.dev \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=joern@lazybastard.org \
--cc=jonathanh@nvidia.com \
--cc=kamal.dasu@broadcom.com \
--cc=keguang.zhang@gmail.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=kursad.oney@broadcom.com \
--cc=kyungmin.park@samsung.com \
--cc=liang.yang@amlogic.com \
--cc=linusw@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mani@kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=michal.simek@amd.com \
--cc=miquel.raynal@bootlin.com \
--cc=mpe@ellerman.id.au \
--cc=mwalle@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.ferre@microchip.com \
--cc=npiggin@gmail.com \
--cc=paul@crapouillou.net \
--cc=piotr.wojtaszczyk@timesys.com \
--cc=pratyush@kernel.org \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=ritesh.list@gmail.com \
--cc=rjui@broadcom.com \
--cc=robert.jarzmik@free.fr \
--cc=s.hauer@pengutronix.de \
--cc=samuel@sholland.org \
--cc=sbranden@broadcom.com \
--cc=schung@nuvoton.com \
--cc=sshegde@linux.ibm.com \
--cc=stefan@agner.ch \
--cc=takahiro.kuwano@infineon.com \
--cc=thierry.reding@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=vigneshr@ti.com \
--cc=vz@mleia.com \
--cc=wens@kernel.org \
--cc=william.zhang@broadcom.com \
--cc=ychuang3@nuvoton.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®