aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-07-11 09:53:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-11 14:47:07 -0400
commita8798a5c77c9981e88caef1373a3310bf8aed219 (patch)
tree71ef5094cd9e4af67acf5a1f62f9ad8ad408c39e
parentf89e57c4f5d7efdbe73b6214c73058aa335870e4 (diff)
alx: fix lockdep annotation
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>
-rw-r--r--drivers/net/ethernet/atheros/alx/main.c5
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 0e0b242a9dd4..027398ebbba6 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1245,6 +1245,8 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1245 1245
1246 SET_NETDEV_DEV(netdev, &pdev->dev); 1246 SET_NETDEV_DEV(netdev, &pdev->dev);
1247 alx = netdev_priv(netdev); 1247 alx = netdev_priv(netdev);
1248 spin_lock_init(&alx->hw.mdio_lock);
1249 spin_lock_init(&alx->irq_lock);
1248 alx->dev = netdev; 1250 alx->dev = netdev;
1249 alx->hw.pdev = pdev; 1251 alx->hw.pdev = pdev;
1250 alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP | 1252 alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP |
@@ -1327,9 +1329,6 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1327 1329
1328 INIT_WORK(&alx->link_check_wk, alx_link_check); 1330 INIT_WORK(&alx->link_check_wk, alx_link_check);
1329 INIT_WORK(&alx->reset_wk, alx_reset); 1331 INIT_WORK(&alx->reset_wk, alx_reset);
1330 spin_lock_init(&alx->hw.mdio_lock);
1331 spin_lock_init(&alx->irq_lock);
1332
1333 netif_carrier_off(netdev); 1332 netif_carrier_off(netdev);
1334 1333
1335 err = register_netdev(netdev); 1334 err = register_netdev(netdev);