mirror of https://github.com/torvalds/linux.git
net: dsa: loop: use new helper fixed_phy_register_100fd to simplify the code
Use new helper fixed_phy_register_100fd to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/922f1b45-1748-4dd2-87eb-9d018df44731@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e483a615a6
commit
b981e100c1
|
|
@ -441,11 +441,6 @@ static int __init dsa_loop_create_switch_mdiodev(void)
|
|||
|
||||
static int __init dsa_loop_init(void)
|
||||
{
|
||||
struct fixed_phy_status status = {
|
||||
.link = 1,
|
||||
.speed = SPEED_100,
|
||||
.duplex = DUPLEX_FULL,
|
||||
};
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
|
|
@ -454,7 +449,7 @@ static int __init dsa_loop_init(void)
|
|||
return ret;
|
||||
|
||||
for (i = 0; i < NUM_FIXED_PHYS; i++)
|
||||
phydevs[i] = fixed_phy_register(&status, NULL);
|
||||
phydevs[i] = fixed_phy_register_100fd();
|
||||
|
||||
ret = mdio_driver_register(&dsa_loop_drv);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue