microchip: lan865x: Fix module autoloading
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: 5cd2340cb6 ("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>
This commit is contained in:
committed by
Jakub Kicinski
parent
b3852ae310
commit
c7217963eb
@@ -423,10 +423,11 @@ static void lan865x_remove(struct spi_device *spi)
|
||||
free_netdev(priv->netdev);
|
||||
}
|
||||
|
||||
static const struct spi_device_id spidev_spi_ids[] = {
|
||||
static const struct spi_device_id lan865x_ids[] = {
|
||||
{ .name = "lan8650" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, lan865x_ids);
|
||||
|
||||
static const struct of_device_id lan865x_dt_ids[] = {
|
||||
{ .compatible = "microchip,lan8650" },
|
||||
@@ -441,7 +442,7 @@ static struct spi_driver lan865x_driver = {
|
||||
},
|
||||
.probe = lan865x_probe,
|
||||
.remove = lan865x_remove,
|
||||
.id_table = spidev_spi_ids,
|
||||
.id_table = lan865x_ids,
|
||||
};
|
||||
module_spi_driver(lan865x_driver);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user