patch-2.3.18 linux/drivers/atm/suni.c

Next file: linux/drivers/atm/zatm.c
Previous file: linux/drivers/atm/nicstar.c.old_skb
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.17/linux/drivers/atm/suni.c linux/drivers/atm/suni.c
@@ -1,6 +1,6 @@
 /* drivers/atm/suni.c - PMC SUNI (PHY) driver */
  
-/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
 
 
 #include <linux/module.h>
@@ -45,7 +45,7 @@
   PUT((GET(reg) & ~(mask)) | ((value) << (shift)),reg)
 
 
-static struct timer_list poll_timer = { NULL, NULL, 0L, 0L, NULL };
+static struct timer_list poll_timer;
 static int start_timer = 1;
 static struct suni_priv *sunis = NULL;
 
@@ -91,11 +91,7 @@
 		    ((GET(TACP_TCCM) & 7) << 16);
 		if (stats->tx_cells < 0) stats->tx_cells = LONG_MAX;
 	}
-	if (!start_timer) {
-		del_timer(&poll_timer);
-		poll_timer.expires = jiffies+HZ;
-		add_timer(&poll_timer);
-	}
+	if (!start_timer) mod_timer(&poll_timer,jiffies+HZ);
 }
 
 
@@ -244,7 +240,7 @@
 	else {
 		start_timer = 0;
 		restore_flags(flags);
-		/*init_timer(&poll_timer);*/
+		init_timer(&poll_timer);
 		poll_timer.expires = jiffies+HZ;
 		poll_timer.function = suni_hz;
 #if 0
@@ -282,9 +278,10 @@
 }
 
 
-#ifdef MODULE
-
 EXPORT_SYMBOL(suni_init);
+
+
+#ifdef MODULE
 
 
 int init_module(void)

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