aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 0e9833adf9fe..d7e56438b5d6 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -66,7 +66,6 @@ static const char version[] =
66#endif 66#endif
67 67
68 68
69#include <linux/config.h>
70#include <linux/init.h> 69#include <linux/init.h>
71#include <linux/module.h> 70#include <linux/module.h>
72#include <linux/kernel.h> 71#include <linux/kernel.h>
@@ -155,7 +154,7 @@ MODULE_LICENSE("GPL");
155 154
156/* 155/*
157 * The maximum number of processing loops allowed for each call to the 156 * The maximum number of processing loops allowed for each call to the
158 * IRQ handler. 157 * IRQ handler.
159 */ 158 */
160#define MAX_IRQ_LOOPS 8 159#define MAX_IRQ_LOOPS 8
161 160
@@ -322,12 +321,12 @@ static void smc_reset(struct net_device *dev)
322 DBG(2, "%s: %s\n", dev->name, __FUNCTION__); 321 DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
323 322
324 /* Disable all interrupts, block TX tasklet */ 323 /* Disable all interrupts, block TX tasklet */
325 spin_lock(&lp->lock); 324 spin_lock_irq(&lp->lock);
326 SMC_SELECT_BANK(2); 325 SMC_SELECT_BANK(2);
327 SMC_SET_INT_MASK(0); 326 SMC_SET_INT_MASK(0);
328 pending_skb = lp->pending_tx_skb; 327 pending_skb = lp->pending_tx_skb;
329 lp->pending_tx_skb = NULL; 328 lp->pending_tx_skb = NULL;
330 spin_unlock(&lp->lock); 329 spin_unlock_irq(&lp->lock);
331 330
332 /* free any pending tx skb */ 331 /* free any pending tx skb */
333 if (pending_skb) { 332 if (pending_skb) {
@@ -449,12 +448,12 @@ static void smc_shutdown(struct net_device *dev)
449 DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__); 448 DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
450 449
451 /* no more interrupts for me */ 450 /* no more interrupts for me */
452 spin_lock(&lp->lock); 451 spin_lock_irq(&lp->lock);
453 SMC_SELECT_BANK(2); 452 SMC_SELECT_BANK(2);
454 SMC_SET_INT_MASK(0); 453 SMC_SET_INT_MASK(0);
455 pending_skb = lp->pending_tx_skb; 454 pending_skb = lp->pending_tx_skb;
456 lp->pending_tx_skb = NULL; 455 lp->pending_tx_skb = NULL;
457 spin_unlock(&lp->lock); 456 spin_unlock_irq(&lp->lock);
458 if (pending_skb) 457 if (pending_skb)
459 dev_kfree_skb(pending_skb); 458 dev_kfree_skb(pending_skb);
460 459
@@ -766,7 +765,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
766 /* 765 /*
767 * Allocation succeeded: push packet to the chip's own memory 766 * Allocation succeeded: push packet to the chip's own memory
768 * immediately. 767 * immediately.
769 */ 768 */
770 smc_hardware_send_pkt((unsigned long)dev); 769 smc_hardware_send_pkt((unsigned long)dev);
771 } 770 }
772 771
@@ -1740,7 +1739,7 @@ static void smc_ethtool_setmsglevel(struct net_device *dev, u32 level)
1740 lp->msg_enable = level; 1739 lp->msg_enable = level;
1741} 1740}
1742 1741
1743static struct ethtool_ops smc_ethtool_ops = { 1742static const struct ethtool_ops smc_ethtool_ops = {
1744 .get_settings = smc_ethtool_getsettings, 1743 .get_settings = smc_ethtool_getsettings,
1745 .set_settings = smc_ethtool_setsettings, 1744 .set_settings = smc_ethtool_setsettings,
1746 .get_drvinfo = smc_ethtool_getdrvinfo, 1745 .get_drvinfo = smc_ethtool_getdrvinfo,
@@ -2345,7 +2344,7 @@ static int __init smc_init(void)
2345#ifdef MODULE 2344#ifdef MODULE
2346#ifdef CONFIG_ISA 2345#ifdef CONFIG_ISA
2347 if (io == -1) 2346 if (io == -1)
2348 printk(KERN_WARNING 2347 printk(KERN_WARNING
2349 "%s: You shouldn't use auto-probing with insmod!\n", 2348 "%s: You shouldn't use auto-probing with insmod!\n",
2350 CARDNAME); 2349 CARDNAME);
2351#endif 2350#endif