Skip to content

Commit 2f8e7ec

Browse files
lunndavem330
authored andcommitted
net: dsa: mv88e6060: Remove support for legacy probing
Now that the driver can be probed as an mdio device, remove the legacy DSA platform device probing. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2776176 commit 2f8e7ec

File tree

2 files changed

+2
-40
lines changed

2 files changed

+2
-40
lines changed

drivers/net/dsa/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ config NET_DSA_MT7530
4141

4242
config NET_DSA_MV88E6060
4343
tristate "Marvell 88E6060 ethernet switch chip support"
44-
depends on NET_DSA && NET_DSA_LEGACY
44+
depends on NET_DSA
4545
select NET_DSA_TAG_TRAILER
4646
---help---
4747
This enables support for the Marvell 88E6060 ethernet switch

drivers/net/dsa/mv88e6060.c

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,6 @@ static enum dsa_tag_protocol mv88e6060_get_tag_protocol(struct dsa_switch *ds,
4848
return DSA_TAG_PROTO_TRAILER;
4949
}
5050

51-
static const char *mv88e6060_drv_probe(struct device *dsa_dev,
52-
struct device *host_dev, int sw_addr,
53-
void **_priv)
54-
{
55-
struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
56-
struct mv88e6060_priv *priv;
57-
const char *name;
58-
59-
name = mv88e6060_get_name(bus, sw_addr);
60-
if (name) {
61-
priv = devm_kzalloc(dsa_dev, sizeof(*priv), GFP_KERNEL);
62-
if (!priv)
63-
return NULL;
64-
*_priv = priv;
65-
priv->bus = bus;
66-
priv->sw_addr = sw_addr;
67-
}
68-
69-
return name;
70-
}
71-
7251
static int mv88e6060_switch_reset(struct mv88e6060_priv *priv)
7352
{
7453
int i;
@@ -266,16 +245,11 @@ mv88e6060_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val)
266245

267246
static const struct dsa_switch_ops mv88e6060_switch_ops = {
268247
.get_tag_protocol = mv88e6060_get_tag_protocol,
269-
.probe = mv88e6060_drv_probe,
270248
.setup = mv88e6060_setup,
271249
.phy_read = mv88e6060_phy_read,
272250
.phy_write = mv88e6060_phy_write,
273251
};
274252

275-
static struct dsa_switch_driver mv88e6060_switch_drv = {
276-
.ops = &mv88e6060_switch_ops,
277-
};
278-
279253
static int mv88e6060_probe(struct mdio_device *mdiodev)
280254
{
281255
struct device *dev = &mdiodev->dev;
@@ -332,19 +306,7 @@ static struct mdio_driver mv88e6060_driver = {
332306
},
333307
};
334308

335-
static int __init mv88e6060_init(void)
336-
{
337-
register_switch_driver(&mv88e6060_switch_drv);
338-
return mdio_driver_register(&mv88e6060_driver);
339-
}
340-
module_init(mv88e6060_init);
341-
342-
static void __exit mv88e6060_cleanup(void)
343-
{
344-
mdio_driver_unregister(&mv88e6060_driver);
345-
unregister_switch_driver(&mv88e6060_switch_drv);
346-
}
347-
module_exit(mv88e6060_cleanup);
309+
mdio_module_driver(mv88e6060_driver);
348310

349311
MODULE_AUTHOR("Lennert Buytenhek <[email protected]>");
350312
MODULE_DESCRIPTION("Driver for Marvell 88E6060 ethernet switch chip");

0 commit comments

Comments
 (0)