mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 04:46:54 -04:00
net: dsa: loop: remove MDIO device modalias
This change is a prerequisite for removing the MDIO device modalias, as dsa_loop is the only user. Switch from modalias to a custom bus match function. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Tested-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/15a4318f-50b5-4df5-874e-e387ee070a9d@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
f7aa2ef10c
commit
5fddafbb92
@@ -395,6 +395,12 @@ static struct mdio_driver dsa_loop_drv = {
|
||||
.shutdown = dsa_loop_drv_shutdown,
|
||||
};
|
||||
|
||||
static int dsa_loop_bus_match(struct device *dev,
|
||||
const struct device_driver *drv)
|
||||
{
|
||||
return drv == &dsa_loop_drv.mdiodrv.driver;
|
||||
}
|
||||
|
||||
static void dsa_loop_phydevs_unregister(void)
|
||||
{
|
||||
for (int i = 0; i < NUM_FIXED_PHYS; i++) {
|
||||
@@ -428,7 +434,7 @@ static int __init dsa_loop_create_switch_mdiodev(void)
|
||||
if (IS_ERR(switch_mdiodev))
|
||||
goto out;
|
||||
|
||||
strscpy(switch_mdiodev->modalias, "dsa-loop");
|
||||
switch_mdiodev->bus_match = dsa_loop_bus_match;
|
||||
switch_mdiodev->dev.platform_data = &dsa_loop_pdata;
|
||||
|
||||
ret = mdio_device_register(switch_mdiodev);
|
||||
|
||||
Reference in New Issue
Block a user