diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2008-10-10 01:35:58 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-10 01:35:58 +0400 |
commit | df58ef51caea073f4b45857c51f445f65267dac7 (patch) | |
tree | 5168c80b15861603e1c7e3c530aa984039dc967d /drivers/net/r8169.c | |
parent | 1d74a6bddf647285e7aa4e9ca4ec16eb071dfd95 (diff) | |
download | linux-df58ef51caea073f4b45857c51f445f65267dac7.tar.xz |
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/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 5 |
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) dev->do_ioctl = rtl8169_ioctl; } - /* Read MAC address from EEPROM */ + spin_lock_init(&tp->lock); + rtl_init_mac_address(tp, ioaddr); /* Get MAC address */ @@ -1995,8 +1996,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) tp->timer.data = (unsigned long) dev; tp->timer.function = rtl8169_phy_timer; - spin_lock_init(&tp->lock); - rc = register_netdev(dev); if (rc < 0) goto err_out_msi_5; |