[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201118220357.22292-3-m.grzeschik@pengutronix.de>
Date: Wed, 18 Nov 2020 23:03:48 +0100
From: Michael Grzeschik <m.grzeschik@...gutronix.de>
To: netdev@...r.kernel.org
Cc: andrew@...n.ch, f.fainelli@...il.com, davem@...emloft.net,
kernel@...gutronix.de, matthias.schiffer@...tq-group.com,
woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com
Subject: [PATCH 02/11] net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment
The port_cnt assignment will be done again in the init function.
This patch removes the previous assignment in the detect function.
Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
---
drivers/net/dsa/microchip/ksz8795.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index 8a3d2e607283581..853a0805e08f239 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -1152,7 +1152,6 @@ static int ksz8795_switch_detect(struct ksz_device *dev)
dev->mib_port_cnt = TOTAL_PORT_NUM;
dev->phy_port_cnt = SWITCH_PORT_NUM;
- dev->port_cnt = SWITCH_PORT_NUM;
if (id2 == CHIP_ID_95) {
u8 val;
@@ -1162,7 +1161,6 @@ static int ksz8795_switch_detect(struct ksz_device *dev)
if (val & PORT_FIBER_MODE)
id2 = 0x65;
} else if (id2 == CHIP_ID_94) {
- dev->port_cnt--;
id2 = 0x94;
}
id16 &= ~0xff;
--
2.29.2
Powered by blists - more mailing lists