summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-06-20 13:14:00 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-21 03:58:28 -0400
commitaa8ac3967e1f8d21b5f89d2a17b1281e1eb52522 (patch)
tree7d82892ec3a18e0ecd3e7bac55b8ab2b70e88acb
parentfbae5a4895b8694126388ee033b6dd0b33fadf2b (diff)
downloadlinux-aa8ac3967e1f8d21b5f89d2a17b1281e1eb52522.tar.bz2
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>
-rw-r--r--drivers/net/dsa/mv88e6xxx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index 673283a89785..b3170ea49592 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -3728,7 +3728,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
if (!ps->info)
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)) {
err = PTR_ERR(ps->reset);
if (err == -ENOENT) {
@@ -3743,13 +3743,13 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
!of_property_read_u32(np, "eeprom-length", &eeprom_len))
ps->eeprom_len = eeprom_len;
- err = mv88e6xxx_mdio_register(ps, mdiodev->dev.of_node);
+ err = mv88e6xxx_mdio_register(ps, np);
if (err)
return err;
dev_set_drvdata(dev, ds);
- err = dsa_register_switch(ds, mdiodev->dev.of_node);
+ err = dsa_register_switch(ds, np);
if (err) {
mv88e6xxx_mdio_unregister(ps);
return err;