net: dsa: microchip: ksz8795: use reg_mib_cnt where possible
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 1 Dec 2020 20:44:59 +0000 (21:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 01:16:29 +0000 (17:16 -0800)
commit31b62c78c1645e829a08453458224f832ac1ac7b
tree2d4ff280f56429836e81b036b4655bcfae1783a5
parent7fc32b41fef6351527d946dd62ac865e70fc636d
net: dsa: microchip: ksz8795: use reg_mib_cnt where possible

The extra define SWITCH_COUNTER_NUM is a copy of the KSZ8795_COUNTER_NUM
define. This patch initializes reg_mib_cnt with KSZ8795_COUNTER_NUM,
makes use of reg_mib_cnt everywhere instead and removes the extra
define.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
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>
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz8795_reg.h