diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-09-27 19:57:54 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-27 19:57:54 +0100 |
commit | 2dc94310bd94d0906febea7d0f7c188da620c952 (patch) | |
tree | 6de4096f1887e2c00966177354b1c378e59bd632 /drivers/net/tulip/de2104x.c | |
parent | c06015148fa9a3cc452ec7121b8c3f59f4a7d6ac (diff) | |
parent | fb60cf4ab52f3520c2119aa42f7d4ed8e7594eb6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream into devel
Diffstat (limited to 'drivers/net/tulip/de2104x.c')
-rw-r--r-- | drivers/net/tulip/de2104x.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d05c5aa254e..e1b48bd8664 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c @@ -1670,7 +1670,7 @@ static void de_get_regs(struct net_device *dev, struct ethtool_regs *regs, spin_unlock_irq(&de->lock); } -static struct ethtool_ops de_ethtool_ops = { +static const struct ethtool_ops de_ethtool_ops = { .get_link = ethtool_op_get_link, .get_tx_csum = ethtool_op_get_tx_csum, .get_sg = ethtool_op_get_sg, @@ -2138,17 +2138,21 @@ static int de_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); struct de_private *de = dev->priv; + int retval = 0; rtnl_lock(); if (netif_device_present(dev)) goto out; - if (netif_running(dev)) { - pci_enable_device(pdev); - de_init_hw(de); - netif_device_attach(dev); - } else { - netif_device_attach(dev); + if (!netif_running(dev)) + goto out_attach; + if ((retval = pci_enable_device(pdev))) { + printk (KERN_ERR "%s: pci_enable_device failed in resume\n", + dev->name); + goto out; } + de_init_hw(de); +out_attach: + netif_device_attach(dev); out: rtnl_unlock(); return 0; @@ -2172,7 +2176,7 @@ static int __init de_init (void) #ifdef MODULE printk("%s", version); #endif - return pci_module_init (&de_driver); + return pci_register_driver(&de_driver); } static void __exit de_exit (void) |