]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: mdio: rename RTMDIO_MAX_PORT to RTMDIO_MAX_PHY
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sat, 21 Feb 2026 08:39:14 +0000 (09:39 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Mar 2026 13:41:05 +0000 (14:41 +0100)
As with all the rest align the define to reflect that the
driver deals with phys.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22131
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c

index 5b7d702fd47a4b314b142493f60de40c04891be7..17c4522adee1c5d136593fc5126c736c1f637cbc 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/regmap.h>
 #include <linux/types.h>
 
-#define RTMDIO_MAX_PORT                                57
+#define RTMDIO_MAX_PHY                         57
 #define RTMDIO_MAX_SMI_BUS                     4
 #define RTMDIO_PAGE_SELECT                     0x1f
 
 struct rtmdio_ctrl {
        struct regmap *map;
        const struct rtmdio_config *cfg;
-       int page[RTMDIO_MAX_PORT];
-       bool raw[RTMDIO_MAX_PORT];
-       int smi_bus[RTMDIO_MAX_PORT];
-       int smi_addr[RTMDIO_MAX_PORT];
+       int page[RTMDIO_MAX_PHY];
+       bool raw[RTMDIO_MAX_PHY];
+       int smi_bus[RTMDIO_MAX_PHY];
+       int smi_addr[RTMDIO_MAX_PHY];
        bool smi_bus_isc45[RTMDIO_MAX_SMI_BUS];
 };
 
@@ -877,7 +877,7 @@ static int rtmdio_reset(struct mii_bus *bus)
 static int rtmdio_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct device_node *dn[RTMDIO_MAX_PORT] = {}, *np;
+       struct device_node *dn[RTMDIO_MAX_PHY] = {}, *np;
        struct rtmdio_ctrl *ctrl;
        struct mii_bus *bus;
        int ret, addr;
@@ -892,7 +892,7 @@ static int rtmdio_probe(struct platform_device *pdev)
        if (IS_ERR(ctrl->map))
                return PTR_ERR(ctrl->map);
 
-       for (addr = 0; addr < RTMDIO_MAX_PORT; addr++)
+       for (addr = 0; addr < RTMDIO_MAX_PHY; addr++)
                ctrl->smi_bus[addr] = -1;
 
        for_each_node_by_name(np, "ethernet-phy") {