aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2008-10-09 17:35:58 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-09 17:35:58 -0400
commitdf58ef51caea073f4b45857c51f445f65267dac7 (patch)
tree5168c80b15861603e1c7e3c530aa984039dc967d /drivers/net
parent1d74a6bddf647285e7aa4e9ca4ec16eb071dfd95 (diff)
r8169: fix early spinlock use
rtl8169_init_one -> rtl_init_mac_address -> rtl_rar_set -> spin_lock_irq(&tp->lock); [...] -> spin_lock_init(&tp->lock); Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 108aaff0b211..59fbc64d7c47 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1952,7 +1952,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1952 dev->do_ioctl = rtl8169_ioctl; 1952 dev->do_ioctl = rtl8169_ioctl;
1953 } 1953 }
1954 1954
1955 /* Read MAC address from EEPROM */ 1955 spin_lock_init(&tp->lock);
1956
1956 rtl_init_mac_address(tp, ioaddr); 1957 rtl_init_mac_address(tp, ioaddr);
1957 1958
1958 /* Get MAC address */ 1959 /* Get MAC address */
@@ -1995,8 +1996,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1995 tp->timer.data = (unsigned long) dev; 1996 tp->timer.data = (unsigned long) dev;
1996 tp->timer.function = rtl8169_phy_timer; 1997 tp->timer.function = rtl8169_phy_timer;
1997 1998
1998 spin_lock_init(&tp->lock);
1999
2000 rc = register_netdev(dev); 1999 rc = register_netdev(dev);
2001 if (rc < 0) 2000 if (rc < 0)
2002 goto err_out_msi_5; 2001 goto err_out_msi_5;