net: dsa: mv88e6xxx: use already declared variables
In the MDIO probing function, dev is already assigned to &mdiodev->dev and np is already assigned to mdiodev->dev.of_node, so use them. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fbae5a4895
commit
aa8ac3967e
|
@ -3728,7 +3728,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
|
||||||
if (!ps->info)
|
if (!ps->info)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
ps->reset = devm_gpiod_get(&mdiodev->dev, "reset", GPIOD_ASIS);
|
ps->reset = devm_gpiod_get(dev, "reset", GPIOD_ASIS);
|
||||||
if (IS_ERR(ps->reset)) {
|
if (IS_ERR(ps->reset)) {
|
||||||
err = PTR_ERR(ps->reset);
|
err = PTR_ERR(ps->reset);
|
||||||
if (err == -ENOENT) {
|
if (err == -ENOENT) {
|
||||||
|
@ -3743,13 +3743,13 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
|
||||||
!of_property_read_u32(np, "eeprom-length", &eeprom_len))
|
!of_property_read_u32(np, "eeprom-length", &eeprom_len))
|
||||||
ps->eeprom_len = eeprom_len;
|
ps->eeprom_len = eeprom_len;
|
||||||
|
|
||||||
err = mv88e6xxx_mdio_register(ps, mdiodev->dev.of_node);
|
err = mv88e6xxx_mdio_register(ps, np);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
dev_set_drvdata(dev, ds);
|
dev_set_drvdata(dev, ds);
|
||||||
|
|
||||||
err = dsa_register_switch(ds, mdiodev->dev.of_node);
|
err = dsa_register_switch(ds, np);
|
||||||
if (err) {
|
if (err) {
|
||||||
mv88e6xxx_mdio_unregister(ps);
|
mv88e6xxx_mdio_unregister(ps);
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue