patch-2.4.19 linux-2.4.19/drivers/net/sgiseeq.c

Next file: linux-2.4.19/drivers/net/sis900.c
Previous file: linux-2.4.19/drivers/net/sb1250-mac.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/net/sgiseeq.c linux-2.4.19/drivers/net/sgiseeq.c
@@ -1,10 +1,10 @@
-/* $Id: sgiseeq.c,v 1.17 2000/03/27 23:02:57 ralf Exp $
- *
+/*
  * sgiseeq.c: Seeq8003 ethernet driver for SGI machines.
  *
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
  */
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -451,20 +451,22 @@
 	unsigned long flags;
 	int err;
 
-	save_flags(flags); cli();
-	if (request_irq(dev->irq, sgiseeq_interrupt, 0, sgiseeqstr, (void *) dev)) {
+	__save_and_cli(flags);
+
+	err = -EAGAIN;
+	if (request_irq(dev->irq, sgiseeq_interrupt, 0, sgiseeqstr, dev)) {
 		printk("Seeq8003: Can't get irq %d\n", dev->irq);
-		restore_flags(flags);
-		return -EAGAIN;
+		goto out;
 	}
-
 	err = init_seeq(dev, sp, sregs);
 	if (err)
-		return err;
+		goto out;
 
 	netif_start_queue(dev);
-	restore_flags(flags);
-	return 0;
+
+out:
+	__restore_flags(flags);
+	return err;
 }
 
 static int sgiseeq_close(struct net_device *dev)
@@ -721,3 +723,5 @@
 			    (struct sgiseeq_regs *) (KSEG1ADDR(0x1fbd4000)),
 			    &hpc3c0->ethregs, SGI_ENET_IRQ);
 }
+
+MODULE_LICENSE("GPL");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)