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 <[email protected]>
---
 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


Reply via email to