Skip to content

Commit a30144c

Browse files
arndbmiquelraynal
authored andcommitted
mtd: dataflash: remove duplicate SPI ID table
Building with -Werror=override-init reveals that two patches added the same device ID table to this driver: drivers/mtd/devices/mtd_dataflash.c:946:27: error: initialized field overwritten [-Werror=override-init] 946 | .id_table = dataflash_spi_ids, | ^~~~~~~~~~~~~~~~~ drivers/mtd/devices/mtd_dataflash.c:946:27: note: (near initialization for 'dataflash_driver.id_table') Remove one of the copies. Fixes: 27a030e ("mtd: dataflash: Add device-tree SPI IDs") Fixes: ac4f834 ("mtd: dataflash: Add SPI ID table") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 1b929c0 commit a30144c

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/mtd/devices/mtd_dataflash.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ struct dataflash {
9696
struct mtd_info mtd;
9797
};
9898

99-
static const struct spi_device_id dataflash_dev_ids[] = {
100-
{ "at45" },
101-
{ "dataflash" },
102-
{ },
103-
};
104-
MODULE_DEVICE_TABLE(spi, dataflash_dev_ids);
105-
10699
#ifdef CONFIG_OF
107100
static const struct of_device_id dataflash_dt_ids[] = {
108101
{ .compatible = "atmel,at45", },
@@ -939,8 +932,6 @@ static struct spi_driver dataflash_driver = {
939932
.name = "mtd_dataflash",
940933
.of_match_table = of_match_ptr(dataflash_dt_ids),
941934
},
942-
.id_table = dataflash_dev_ids,
943-
944935
.probe = dataflash_probe,
945936
.remove = dataflash_remove,
946937
.id_table = dataflash_spi_ids,

0 commit comments

Comments
 (0)