提交 1d35f0b2 编写于 作者: V Vivien Didelot 提交者: David S. Miller

net: dsa: mv88e6xxx: do not increment bus refcount

The MDIO device probe and remove functions are respectively incrementing
and decrementing the bus refcount themselves. Since these bus level
actions are out of the device scope, remove them.
Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aa8ac396
......@@ -3712,8 +3712,6 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
ps->sw_addr = mdiodev->addr;
mutex_init(&ps->smi_mutex);
get_device(&ps->bus->dev);
ds->drv = &mv88e6xxx_switch_driver;
id = mv88e6xxx_reg_read(ps, REG_PORT(0), PORT_SWITCH_ID);
......@@ -3767,7 +3765,6 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
dsa_unregister_switch(ds);
put_device(&ps->bus->dev);
mv88e6xxx_mdio_unregister(ps);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册