[PATCH] kill off last remands of the release timer

Christoph Hellwig hch at lst.de
Sun Aug 17 20:05:14 BST 2003


update the previously missed atmel_cs driver and kill the struct member.


--- 1.2/drivers/net/wireless/atmel_cs.c	Thu Jul 10 19:47:29 2003
+++ edited/drivers/net/wireless/atmel_cs.c	Sun Aug 17 17:50:16 2003
@@ -39,7 +39,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/timer.h>
 #include <linux/netdevice.h>
 #include <linux/moduleparam.h>
 #include <linux/device.h>
@@ -108,7 +107,7 @@
 int reset_atmel_card( struct net_device * );
 
 static void atmel_config(dev_link_t *link);
-static void atmel_release(u_long arg);
+static void atmel_release(dev_link_t *link);
 static int atmel_event(event_t event, int priority,
 		       event_callback_args_t *args);
 
@@ -222,9 +221,6 @@
 		return NULL;
 	}
 	memset(link, 0, sizeof(struct dev_link_t));
-	init_timer(&link->release);
-	link->release.function = &atmel_release;
-	link->release.data = (u_long)link;
 	
 	/* Interrupt setup */
 	link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
@@ -300,9 +296,8 @@
 	if (*linkp == NULL)
 		return;
 
-	del_timer(&link->release);
 	if ( link->state & DEV_CONFIG ) {
-		atmel_release( (int)link );
+		atmel_release(link);
 		if ( link->state & DEV_STALE_CONFIG ) {
 			link->state |= DEV_STALE_LINK;
 			return;
@@ -606,9 +601,8 @@
 	
  cs_failed:
 	cs_error(link->handle, last_fn, last_ret);
-	atmel_release((u_long)link);
-	
-} /* atmel_config */
+	atmel_release(link);
+}
 
 /*======================================================================
   
@@ -618,9 +612,8 @@
   
   ======================================================================*/
 
-static void atmel_release(u_long arg)
+static void atmel_release(dev_link_t *link)
 {
-	dev_link_t *link = (dev_link_t *)arg;
 	struct net_device *dev = ((local_info_t*)link->priv)->eth_dev;
 		
 	DEBUG(0, "atmel_release(0x%p)\n", link);
@@ -639,8 +632,7 @@
 	if (link->irq.AssignedIRQ)
 		CardServices(ReleaseIRQ, link->handle, &link->irq);
 	link->state &= ~DEV_CONFIG;
-	
-} /* atmel_release */
+}
 
 /*======================================================================
   
@@ -667,7 +659,7 @@
 		link->state &= ~DEV_PRESENT;
 		if (link->state & DEV_CONFIG) {
 			netif_device_detach(local->eth_dev);
-			mod_timer(&link->release, jiffies + HZ/20);
+			atmel_release(link);
 		}
 		break;
 	case CS_EVENT_CARD_INSERTION:
@@ -719,7 +711,7 @@
         /* XXX: this really needs to move into generic code.. */
         while (dev_list != NULL) {
                 if (dev_list->state & DEV_CONFIG)
-                        atmel_release((u_long)dev_list);
+                        atmel_release(dev_list);
                 atmel_detach(dev_list);
         }
 }
--- 1.11/include/pcmcia/ds.h	Sun May 18 16:57:40 2003
+++ edited/include/pcmcia/ds.h	Sun Aug 17 17:50:22 2003
@@ -118,7 +118,6 @@
     dev_node_t		*dev;
     u_int		state, open;
     wait_queue_head_t	pending;
-    struct timer_list	release;
     client_handle_t	handle;
     io_req_t		io;
     irq_req_t		irq;



More information about the linux-pcmcia mailing list