diff mbox series

[net,V3,1/2] net: dsa: microchip: Do not reinit mutexes on KSZ87xx

Message ID 20191016133324.10451-1-marex@denx.de
State Accepted
Delegated to: David Miller
Headers show
Series [net,V3,1/2] net: dsa: microchip: Do not reinit mutexes on KSZ87xx | expand

Commit Message

Marek Vasut Oct. 16, 2019, 1:33 p.m. UTC
The KSZ87xx driver calls mutex_init() on mutexes already inited in
ksz_common.c ksz_switch_register(). Do not do it twice, drop the
reinitialization.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: David S. Miller <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: George McCollister <george.mccollister@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <woojung.huh@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
V2: None
V3: None
---
 drivers/net/dsa/microchip/ksz8795.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

David Miller Oct. 17, 2019, 7:38 p.m. UTC | #1
From: Marek Vasut <marex@denx.de>
Date: Wed, 16 Oct 2019 15:33:23 +0200

> The KSZ87xx driver calls mutex_init() on mutexes already inited in
> ksz_common.c ksz_switch_register(). Do not do it twice, drop the
> reinitialization.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index a23d3ffdf0c4..24a5e99f7fd5 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -1224,10 +1224,6 @@  static int ksz8795_switch_init(struct ksz_device *dev)
 {
 	int i;
 
-	mutex_init(&dev->stats_mutex);
-	mutex_init(&dev->alu_mutex);
-	mutex_init(&dev->vlan_mutex);
-
 	dev->ds->ops = &ksz8795_switch_ops;
 
 	for (i = 0; i < ARRAY_SIZE(ksz8795_switch_chips); i++) {