diff options
| author | Markus Stockhausen | 2025-12-24 11:19:02 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-12-29 11:57:05 +0000 |
| commit | 3fb1c9c6259ef1d4916c7f1f40988a5e4275337c (patch) | |
| tree | 890a4ce28ef292caf8cda0c8cd76ce610fcac2bc | |
| parent | 89f56789482675efd406575103b9333ecc098157 (diff) | |
| download | openwrt-3fb1c9c6259ef1d4916c7f1f40988a5e4275337c.tar.gz | |
realtek: mdio: configure bus read/write only once.
For all families the driver uses the same read/write functions.
Drop the duplicate per-family initialization.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21274
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c index 04cc924479..97f8ae1a70 100644 --- a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c +++ b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c @@ -1440,8 +1440,6 @@ static int rtmdio_probe(struct platform_device *pdev) switch (family) { case RTMDIO_838X_FAMILY_ID: bus->name = "rtl838x-eth-mdio"; - bus->read = rtmdio_read; - bus->write = rtmdio_write; bus->reset = rtmdio_838x_reset; priv->read_sds_phy = rtmdio_838x_read_sds_phy; priv->write_sds_phy = rtmdio_838x_write_sds_phy; @@ -1452,8 +1450,6 @@ static int rtmdio_probe(struct platform_device *pdev) break; case RTMDIO_839X_FAMILY_ID: bus->name = "rtl839x-eth-mdio"; - bus->read = rtmdio_read; - bus->write = rtmdio_write; bus->reset = rtmdio_839x_reset; priv->read_sds_phy = rtmdio_839x_read_sds_phy; priv->write_sds_phy = rtmdio_839x_write_sds_phy; @@ -1464,8 +1460,6 @@ static int rtmdio_probe(struct platform_device *pdev) break; case RTMDIO_930X_FAMILY_ID: bus->name = "rtl930x-eth-mdio"; - bus->read = rtmdio_read; - bus->write = rtmdio_write; bus->reset = rtmdio_930x_reset; priv->read_sds_phy = rtmdio_930x_read_sds_phy; priv->write_sds_phy = rtmdio_930x_write_sds_phy; @@ -1476,8 +1470,6 @@ static int rtmdio_probe(struct platform_device *pdev) break; case RTMDIO_931X_FAMILY_ID: bus->name = "rtl931x-eth-mdio"; - bus->read = rtmdio_read; - bus->write = rtmdio_write; bus->reset = rtmdio_931x_reset; priv->read_sds_phy = rtsds_931x_read; priv->write_sds_phy = rtsds_931x_write; @@ -1487,6 +1479,9 @@ static int rtmdio_probe(struct platform_device *pdev) priv->write_phy = rtmdio_931x_write_phy; break; } + + bus->read = rtmdio_read; + bus->write = rtmdio_write; bus->read_c45 = rtmdio_read_c45; bus->write_c45 = rtmdio_write_c45; bus->parent = dev; |