diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2013-07-11 09:53:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-28 19:29:58 -0400 |
commit | 61b6f1280da836ca67e6e4cfaefd65e989f6bfbc (patch) | |
tree | e2f1d996f195507208c924890674bc657e284f07 /drivers/net/ethernet/atheros | |
parent | 53effe1697676189395fc9f8a02c749e19cc9daa (diff) |
alx: fix lockdep annotation
[ Upstream commit a8798a5c77c9981e88caef1373a3310bf8aed219 ]
Move spin_lock_init to be called before the spinlocks are used, preventing a lockdep splat.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r-- | drivers/net/ethernet/atheros/alx/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c index 418de8b13165..d30085c2b454 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c | |||
@@ -1303,6 +1303,8 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1303 | 1303 | ||
1304 | SET_NETDEV_DEV(netdev, &pdev->dev); | 1304 | SET_NETDEV_DEV(netdev, &pdev->dev); |
1305 | alx = netdev_priv(netdev); | 1305 | alx = netdev_priv(netdev); |
1306 | spin_lock_init(&alx->hw.mdio_lock); | ||
1307 | spin_lock_init(&alx->irq_lock); | ||
1306 | alx->dev = netdev; | 1308 | alx->dev = netdev; |
1307 | alx->hw.pdev = pdev; | 1309 | alx->hw.pdev = pdev; |
1308 | alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP | | 1310 | alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP | |
@@ -1385,9 +1387,6 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1385 | 1387 | ||
1386 | INIT_WORK(&alx->link_check_wk, alx_link_check); | 1388 | INIT_WORK(&alx->link_check_wk, alx_link_check); |
1387 | INIT_WORK(&alx->reset_wk, alx_reset); | 1389 | INIT_WORK(&alx->reset_wk, alx_reset); |
1388 | spin_lock_init(&alx->hw.mdio_lock); | ||
1389 | spin_lock_init(&alx->irq_lock); | ||
1390 | |||
1391 | netif_carrier_off(netdev); | 1390 | netif_carrier_off(netdev); |
1392 | 1391 | ||
1393 | err = register_netdev(netdev); | 1392 | err = register_netdev(netdev); |