]> git.itanic.dy.fi Git - linux-stable/commitdiff
mtd: spi-nor: xilinx: use SPI_NOR_ID() in S3AN_INFO()
authorMichael Walle <mwalle@kernel.org>
Fri, 8 Sep 2023 10:16:21 +0000 (12:16 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 19 Sep 2023 15:49:19 +0000 (18:49 +0300)
In commit 59273180299a ("mtd: spi-nor: Create macros to define chip IDs
and geometries") SPI_NOR_ID() were introduced, but it did only update
the INFO() macro in core.h. Also use it in S3AN_INFO().

Signed-off-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-3-e60548861b10@kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/xilinx.c

index 00d53eae5ee83c634c232a45a086a0cffa8a7d87..de5189c38432dab193bc67896c1e974bb438c604 100644 (file)
                   SPI_MEM_OP_DATA_IN(1, buf, 0))
 
 #define S3AN_INFO(_jedec_id, _n_sectors, _page_size)                   \
-               .id = {                                                 \
-                       ((_jedec_id) >> 16) & 0xff,                     \
-                       ((_jedec_id) >> 8) & 0xff,                      \
-                       (_jedec_id) & 0xff                              \
-                       },                                              \
-               .id_len = 3,                                            \
+               SPI_NOR_ID(_jedec_id, 0),                               \
                .sector_size = (8 * (_page_size)),                      \
                .n_sectors = (_n_sectors),                              \
                .page_size = (_page_size),                              \