Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

eeprom: 93xx46: fix MODULE_DEVICE_TABLE

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20211014153730.3821376-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
f4275272 5d388fa0

+1 -1
+1 -1
drivers/misc/eeprom/eeprom_93xx46.c
··· 421 421 .driver_data = (kernel_ulong_t)&microchip_93lc46b_data, }, 422 422 {} 423 423 }; 424 - MODULE_DEVICE_TABLE(of, eeprom_93xx46_of_table); 424 + MODULE_DEVICE_TABLE(spi, eeprom_93xx46_spi_ids); 425 425 426 426 static int eeprom_93xx46_probe_dt(struct spi_device *spi) 427 427 {