[patch 4/5] pcmcia: socket->{a,c}region are unused

Dominik Brodowski linux at dominikbrodowski.de
Wed Jan 19 17:12:40 EST 2005


From: Christoph Hellwig <hch at lst.de>

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

Signed-off-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Dominik Brodowski <linux at brodo.de>
---

 drivers/pcmcia/cs.c |   22 ++++------------------
 include/pcmcia/ss.h |    2 --
 2 files changed, 4 insertions(+), 20 deletions(-)

Index: 2.6.11-rc1+/drivers/pcmcia/cs.c
===================================================================
--- 2.6.11-rc1+.orig/drivers/pcmcia/cs.c	2005-01-19 22:44:26.000000000 +0100
+++ 2.6.11-rc1+/drivers/pcmcia/cs.c	2005-01-19 22:44:56.000000000 +0100
@@ -341,25 +341,13 @@
 
 /*======================================================================
 
-    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.
+    socket_setup() and shutdown_socket() are called by the main event
+    handler when card insertion and removal events are received.
+    socket_setup() turns on socket power and resets the socket, in two stages.
+    shutdown_socket() unconfigures a socket and turns off socket power.
 
 ======================================================================*/
 
-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 +367,6 @@
 	kfree(s->config);
 	s->config = NULL;
     }
-    free_regions(&s->a_region);
-    free_regions(&s->c_region);
 
     {
 	int status;
Index: 2.6.11-rc1+/include/pcmcia/ss.h
===================================================================
--- 2.6.11-rc1+.orig/include/pcmcia/ss.h	2005-01-19 22:43:17.000000000 +0100
+++ 2.6.11-rc1+/include/pcmcia/ss.h	2005-01-19 22:44:56.000000000 +0100
@@ -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