Skip to content

Commit 1671a3b

Browse files
lategoodbyegregkh
authored andcommitted
microchip: lan865x: Fix module autoloading
commit c721796 upstream. Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from spi_device_id table. While at this, fix the misleading variable name (spidev is unrelated to this driver). Fixes: 5cd2340 ("microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY") Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Cc: stable@kernel.org Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20250827115341.34608-3-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d9e6c6b commit 1671a3b

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/ethernet/microchip/lan865x

1 file changed

+3
-2
lines changed

drivers/net/ethernet/microchip/lan865x/lan865x.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,11 @@ static void lan865x_remove(struct spi_device *spi)
423423
free_netdev(priv->netdev);
424424
}
425425

426-
static const struct spi_device_id spidev_spi_ids[] = {
426+
static const struct spi_device_id lan865x_ids[] = {
427427
{ .name = "lan8650" },
428428
{},
429429
};
430+
MODULE_DEVICE_TABLE(spi, lan865x_ids);
430431

431432
static const struct of_device_id lan865x_dt_ids[] = {
432433
{ .compatible = "microchip,lan8650" },
@@ -441,7 +442,7 @@ static struct spi_driver lan865x_driver = {
441442
},
442443
.probe = lan865x_probe,
443444
.remove = lan865x_remove,
444-
.id_table = spidev_spi_ids,
445+
.id_table = lan865x_ids,
445446
};
446447
module_spi_driver(lan865x_driver);
447448

0 commit comments

Comments
 (0)