Skip to content

Commit 64cf370

Browse files
committed
Merge branch 'encx24j600-fixes'
Javier Martinez Canillas says: ==================== net: encx24j600: Fix SPI driver module autoload Recently I've been trying to fix module autoloading for all SPI drivers and found that the encx24j600 driver does not fill module alias information due missing a MODULE_DEVICE_TABLE() so module autload won't work and the driver Kconfig symbol is tristate which means the driver can be built as a module. But also the SPI id table is not correctly defined so this series fixes both issues. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 322cf7e + 07f56c6 commit 64cf370

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/net/ethernet/microchip/encx24j600.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,11 @@ static int encx24j600_spi_remove(struct spi_device *spi)
10941094
return 0;
10951095
}
10961096

1097-
static const struct spi_device_id encx24j600_spi_id_table = {
1098-
.name = "encx24j600"
1097+
static const struct spi_device_id encx24j600_spi_id_table[] = {
1098+
{ .name = "encx24j600" },
1099+
{ /* sentinel */ }
10991100
};
1101+
MODULE_DEVICE_TABLE(spi, encx24j600_spi_id_table);
11001102

11011103
static struct spi_driver encx24j600_spi_net_driver = {
11021104
.driver = {
@@ -1106,7 +1108,7 @@ static struct spi_driver encx24j600_spi_net_driver = {
11061108
},
11071109
.probe = encx24j600_spi_probe,
11081110
.remove = encx24j600_spi_remove,
1109-
.id_table = &encx24j600_spi_id_table,
1111+
.id_table = encx24j600_spi_id_table,
11101112
};
11111113

11121114
static int __init encx24j600_init(void)

0 commit comments

Comments
 (0)