]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
treewide: Rename PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX
authorMarek Behún <marek.behun@nic.cz>
Wed, 6 Apr 2022 22:33:02 +0000 (00:33 +0200)
committerRamon Fried <ramon@neureality.ai>
Sun, 10 Apr 2022 05:44:13 +0000 (08:44 +0300)
Rename constant PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX to
make it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
drivers/core/ofnode.c
drivers/net/phy/aquantia.c
include/phy_interface.h

index f644a593d32ee5a00e8eff5f2a0219b192cbf9fd..d9ccb1bad268d88e0945f6287673591edb24faa9 100644 (file)
@@ -1234,7 +1234,7 @@ phy_interface_t ofnode_read_phy_mode(ofnode node)
        if (!mode)
                return PHY_INTERFACE_MODE_NONE;
 
-       for (i = 0; i < PHY_INTERFACE_MODE_COUNT; i++)
+       for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++)
                if (!strcmp(mode, phy_interface_strings[i]))
                        return i;
 
index 83075f78c9819c300bfa028123a586f432b5687b..7e950fe0c2fe5e59ee6d0785ee937101c302827f 100644 (file)
@@ -305,7 +305,7 @@ struct {
        u16 syscfg;
        int cnt;
        u16 start_rate;
-} aquantia_syscfg[PHY_INTERFACE_MODE_COUNT] = {
+} aquantia_syscfg[PHY_INTERFACE_MODE_MAX] = {
        [PHY_INTERFACE_MODE_SGMII] =      {0x04b, AQUANTIA_VND1_GSYSCFG_1G,
                                           AQUANTIA_VND1_GSTART_RATE_1G},
        [PHY_INTERFACE_MODE_2500BASEX]  = {0x144, AQUANTIA_VND1_GSYSCFG_2_5G,
index f075abe9c9c0cd7a13cbdb9bf4ed8e4cb5cf8c1d..494bc87e6792cfd5ae7ff9bbd4f04b347c9c79e4 100644 (file)
@@ -41,7 +41,7 @@ typedef enum {
        PHY_INTERFACE_MODE_USXGMII,
        PHY_INTERFACE_MODE_NONE,        /* Must be last */
 
-       PHY_INTERFACE_MODE_COUNT,
+       PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
 
 static const char * const phy_interface_strings[] = {