Skip to content

Commit b981e10

Browse files
hkallweitkuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e483a61 commit b981e10

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/net/dsa/dsa_loop.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,6 @@ static int __init dsa_loop_create_switch_mdiodev(void)
441441

442442
static int __init dsa_loop_init(void)
443443
{
444-
struct fixed_phy_status status = {
445-
.link = 1,
446-
.speed = SPEED_100,
447-
.duplex = DUPLEX_FULL,
448-
};
449444
unsigned int i;
450445
int ret;
451446

@@ -454,7 +449,7 @@ static int __init dsa_loop_init(void)
454449
return ret;
455450

456451
for (i = 0; i < NUM_FIXED_PHYS; i++)
457-
phydevs[i] = fixed_phy_register(&status, NULL);
452+
phydevs[i] = fixed_phy_register_100fd();
458453

459454
ret = mdio_driver_register(&dsa_loop_drv);
460455
if (ret) {

0 commit comments

Comments
 (0)