[PATCH] kill free_regions()

Christoph Hellwig hch at lst.de
Wed Jan 19 06:44:39 EST 2005


socket->{a,c}_region aren't ever touched elsewhere, so let's kill this.


--- 1.122/drivers/pcmcia/cs.c	2005-01-15 23:31:03 +01:00
+++ edited/drivers/pcmcia/cs.c	2005-01-16 13:18:42 +01:00
@@ -338,28 +338,6 @@
 }
 EXPORT_SYMBOL(pcmcia_get_socket_by_nr);
 
-
-/*======================================================================
-
-    Shutdown_Socket() and setup_socket() are scheduled using add_timer
-    calls by the main event handler when card insertion and removal
-    events are received.  Shutdown_Socket() unconfigures a socket and
-    turns off socket power.  Setup_socket() turns on socket power
-    and resets the socket, in two stages.
-
-======================================================================*/
-
-static void free_regions(memory_handle_t *list)
-{
-    memory_handle_t tmp;
-    while (*list != NULL) {
-	tmp = *list;
-	*list = tmp->info.next;
-	tmp->region_magic = 0;
-	kfree(tmp);
-    }
-}
-
 static void shutdown_socket(struct pcmcia_socket *s)
 {
     cs_dbg(s, 1, "shutdown_socket\n");
@@ -379,8 +357,6 @@
 	kfree(s->config);
 	s->config = NULL;
     }
-    free_regions(&s->a_region);
-    free_regions(&s->c_region);
 
     {
 	int status;
--- 1.45/include/pcmcia/ss.h	2005-01-12 01:43:12 +01:00
+++ edited/include/pcmcia/ss.h	2005-01-16 13:27:04 +01:00
@@ -165,7 +165,6 @@
 #define MAX_WIN 4
 
 struct config_t;
-struct region_t;
 struct pcmcia_callback;
 
 
@@ -185,7 +184,6 @@
 	} irq;
 	io_window_t			io[MAX_IO_WIN];
 	window_t			win[MAX_WIN];
-	struct region_t			*c_region, *a_region;
 	struct list_head		cis_cache;
 	u_int				fake_cis_len;
 	char				*fake_cis;



More information about the linux-pcmcia mailing list