summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz8795_reg.h
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2020-12-01 23:45:01 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-03 04:16:29 +0300
commit4ce2a984abd86b002c22b9b84842e32e973a5fec (patch)
tree0c14e1229fe90a02bc4a83a554a2501bf6e298ae /drivers/net/dsa/microchip/ksz8795_reg.h
parent65fe1acf07d76198c77a9c9a672928c539bcbc72 (diff)
downloadlinux-4ce2a984abd86b002c22b9b84842e32e973a5fec.tar.xz
net: dsa: microchip: ksz8795: use phy_port_cnt where possible
The driver is currently hard coded to SWITCH_PORT_NUM being (TOTAL_PORT_NUM - 1) which is limited to 4 user ports for the ksz8795. The phy_port_cnt is referring to its user ports. The patch removes the extra define and use the assigned variable phy_port_cnt instead so the driver can be used on different switches. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz8795_reg.h')
-rw-r--r--drivers/net/dsa/microchip/ksz8795_reg.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/dsa/microchip/ksz8795_reg.h b/drivers/net/dsa/microchip/ksz8795_reg.h
index c13122485013..6377165a236f 100644
--- a/drivers/net/dsa/microchip/ksz8795_reg.h
+++ b/drivers/net/dsa/microchip/ksz8795_reg.h
@@ -848,9 +848,6 @@
#define TOTAL_PORT_NUM 5
-/* Host port can only be last of them. */
-#define SWITCH_PORT_NUM (TOTAL_PORT_NUM - 1)
-
#define KSZ8795_COUNTER_NUM 0x20
/* Common names used by other drivers */