Skip to contentSkip to conversation

eeprom: 93xx46: fix MODULE_DEVICE_TABLE

PATCH In review Arnd Bergmann 2 participants 2 messages Oct 14, 2021 – Oct 15, 2021 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eeprom: 93xx46: fix MODULE_DEVICE_TABLE

From: Arnd Bergmann <[email protected]>

The newly added SPI device ID table does not work because the entry is incorrectly copied from the OF device table.

During build testing, this shows as a compile failure when building it as a loadable module:

drivers/misc/eeprom/eeprom_93xx46.c:424:1: error: redefinition of '__mod_of__eeprom_93xx46_of_table_device_table' MODULE_DEVICE_TABLE(of, eeprom_93xx46_of_table);

Change the entry to refer to the correct symbol.

Fixes 137879f7ff23 ("eeprom: 93xx46: Add SPI device ID table")
---
 drivers/misc/eeprom/eeprom_93xx46.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/eeprom/eeprom_93xx46.c +1 -1
index 660ee924f8b1..1f15399e5cb4 100644
@@ -421,7 +421,7 @@ static const struct spi_device_id eeprom_93xx46_spi_ids[] = {
 	  .driver_data = (kernel_ulong_t)&microchip_93lc46b_data, },
 	{}
 };
-MODULE_DEVICE_TABLE(of, eeprom_93xx46_of_table);
+MODULE_DEVICE_TABLE(spi, eeprom_93xx46_spi_ids);
 
 static int eeprom_93xx46_probe_dt(struct spi_device *spi)
 {
Signature · 1 line
2.29.2
#1 lore raw
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The newly added SPI device ID table does not work because the entry is incorrectly copied from the OF device table.

During build testing, this shows as a compile failure when building it as a loadable module:

drivers/misc/eeprom/eeprom_93xx46.c:424:1: error: redefinition of '__mod_of__eeprom_93xx46_of_table_device_table' MODULE_DEVICE_TABLE(of, eeprom_93xx46_of_table);

Quoted 7 lines

Change the entry to refer to the correct symbol.

Fixes 137879f7ff23 ("eeprom: 93xx46: Add SPI device ID table")
---
 drivers/misc/eeprom/eeprom_93xx46.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Ah, nice catch, will queue this up now, thanks!

greg k-h