* [PATCH] alx: fix lockdep annotation
@ 2013-07-11 13:53 Maarten Lankhorst
2013-07-11 18:47 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Maarten Lankhorst @ 2013-07-11 13:53 UTC (permalink / raw)
To: Jay Cliburn, Chris Snook; +Cc: netdev, LKML
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>
---
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 418de8b..d30085c 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)
SET_NETDEV_DEV(netdev, &pdev->dev);
alx = netdev_priv(netdev);
+ spin_lock_init(&alx->hw.mdio_lock);
+ spin_lock_init(&alx->irq_lock);
alx->dev = netdev;
alx->hw.pdev = pdev;
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)
INIT_WORK(&alx->link_check_wk, alx_link_check);
INIT_WORK(&alx->reset_wk, alx_reset);
- spin_lock_init(&alx->hw.mdio_lock);
- spin_lock_init(&alx->irq_lock);
-
netif_carrier_off(netdev);
err = register_netdev(netdev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] alx: fix lockdep annotation
2013-07-11 13:53 [PATCH] alx: fix lockdep annotation Maarten Lankhorst
@ 2013-07-11 18:47 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-07-11 18:47 UTC (permalink / raw)
To: maarten.lankhorst; +Cc: jcliburn, chris.snook, netdev, linux-kernel
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Thu, 11 Jul 2013 15:53:21 +0200
> 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>
Looks good, applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-11 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 13:53 [PATCH] alx: fix lockdep annotation Maarten Lankhorst
2013-07-11 18:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).