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

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Heiner Kallweit and committed by
Paolo Abeni
5fddafbb f7aa2ef1

+7 -1
+7 -1
drivers/net/dsa/dsa_loop.c
··· 395 395 .shutdown = dsa_loop_drv_shutdown, 396 396 }; 397 397 398 + static int dsa_loop_bus_match(struct device *dev, 399 + const struct device_driver *drv) 400 + { 401 + return drv == &dsa_loop_drv.mdiodrv.driver; 402 + } 403 + 398 404 static void dsa_loop_phydevs_unregister(void) 399 405 { 400 406 for (int i = 0; i < NUM_FIXED_PHYS; i++) { ··· 434 428 if (IS_ERR(switch_mdiodev)) 435 429 goto out; 436 430 437 - strscpy(switch_mdiodev->modalias, "dsa-loop"); 431 + switch_mdiodev->bus_match = dsa_loop_bus_match; 438 432 switch_mdiodev->dev.platform_data = &dsa_loop_pdata; 439 433 440 434 ret = mdio_device_register(switch_mdiodev);