kirkwood: add support for Netgear Stora (MS2000/2110) NAS
[openwrt/staging/hauke.git] / target / linux / ixp4xx / patches-5.10 / 100-net-ixp4xx_eth-Use-DEFINE_SPINLOCK_for_spinlock.patch
1 From 1454c51d1ec1277a54505159c5de62be0c2a2597 Mon Sep 17 00:00:00 2001
2 From: Zheng Yongjun <zhengyongjun3@huawei.com>
3 Date: Tue, 29 Dec 2020 21:49:47 +0800
4 Subject: net: ixp4xx_eth: Use DEFINE_SPINLOCK() for spinlock
5
6 spinlock can be initialized automatically with DEFINE_SPINLOCK()
7 rather than explicitly calling spin_lock_init().
8
9 Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12 drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 +--
13 1 file changed, 1 insertion(+), 2 deletions(-)
14
15 (limited to 'drivers/net/ethernet/xscale/ixp4xx_eth.c')
16
17 diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
18 index 2e52029235104..0152f1e707834 100644
19 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
20 +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
21 @@ -247,7 +247,7 @@ static inline void memcpy_swab32(u32 *dest, u32 *src, int cnt)
22 }
23 #endif
24
25 -static spinlock_t mdio_lock;
26 +static DEFINE_SPINLOCK(mdio_lock);
27 static struct eth_regs __iomem *mdio_regs; /* mdio command and status only */
28 static struct mii_bus *mdio_bus;
29 static int ports_open;
30 @@ -528,7 +528,6 @@ static int ixp4xx_mdio_register(struct eth_regs __iomem *regs)
31
32 mdio_regs = regs;
33 __raw_writel(DEFAULT_CORE_CNTRL, &mdio_regs->core_control);
34 - spin_lock_init(&mdio_lock);
35 mdio_bus->name = "IXP4xx MII Bus";
36 mdio_bus->read = &ixp4xx_mdio_read;
37 mdio_bus->write = &ixp4xx_mdio_write;
38 --
39 cgit 1.2.3-1.el7
40