follow-up-patches [7/10] adjust_resource without handle

Dominik Brodowski linux at brodo.de
Sat Nov 22 14:09:16 GMT 2003


The pcmcia_adjust_resource_info function is only ever called by the
cardmgr userspace tool via ds.c. As it is not socket-related, there is
no need to pass a "handle" or "socket" argument.

 drivers/pcmcia/ds.c       |    5 ++---
 drivers/pcmcia/rsrc_mgr.c |    5 +----
 include/pcmcia/cs.h       |    2 +-
 3 files changed, 4 insertions(+), 8 deletions(-)

diff -ruN linux-original/drivers/pcmcia/ds.c linux/drivers/pcmcia/ds.c
--- linux-original/drivers/pcmcia/ds.c	2003-11-22 12:14:48.529576528 +0100
+++ linux/drivers/pcmcia/ds.c	2003-11-22 12:18:13.994341136 +0100
@@ -359,8 +359,6 @@
 	switch (func) {
 	case AccessConfigurationRegister:
 		return pcmcia_access_configuration_register(a1, a2); break;
-	case AdjustResourceInfo:
-		return pcmcia_adjust_resource_info(a1, a2); break;
 	case CheckEraseQueue:
 		return pcmcia_check_erase_queue(a1); break;
 	case CloseMemory:
@@ -463,6 +461,7 @@
 		return pcmcia_get_next_window(a1, a2); break;
 	case GetMemPage:
 		return pcmcia_get_mem_page(a1, a2); break;
+	case AdjustResourceInfo:
 	case BindDevice:
 	case BindMTD:
 	case SuspendCard:
@@ -1041,7 +1040,7 @@
     
     switch (cmd) {
     case DS_ADJUST_RESOURCE_INFO:
-	ret = pcmcia_adjust_resource_info(s->handle, &buf.adjust);
+	ret = pcmcia_adjust_resource_info(&buf.adjust);
 	break;
     case DS_GET_CARD_SERVICES_INFO:
 	ret = pcmcia_get_card_services_info(&buf.servinfo);
diff -ruN linux-original/drivers/pcmcia/rsrc_mgr.c linux/drivers/pcmcia/rsrc_mgr.c
--- linux-original/drivers/pcmcia/rsrc_mgr.c	2003-11-20 20:21:24.000000000 +0100
+++ linux/drivers/pcmcia/rsrc_mgr.c	2003-11-22 12:18:13.994341136 +0100
@@ -887,11 +887,8 @@
 
 /*====================================================================*/
 
-int pcmcia_adjust_resource_info(client_handle_t handle, adjust_t *adj)
+int pcmcia_adjust_resource_info(adjust_t *adj)
 {
-    if (CHECK_HANDLE(handle))
-	return CS_BAD_HANDLE;
-    
     switch (adj->Resource) {
     case RES_MEMORY_RANGE:
 	return adjust_memory(adj);
diff -ruN linux-original/include/pcmcia/cs.h linux/include/pcmcia/cs.h
--- linux-original/include/pcmcia/cs.h	2003-11-22 12:14:48.530576376 +0100
+++ linux/include/pcmcia/cs.h	2003-11-22 12:18:13.996340832 +0100
@@ -459,7 +459,7 @@
 struct pci_bus *pcmcia_lookup_bus(struct pcmcia_socket *skt);
 
 /* rsrc_mgr.c */
-int pcmcia_adjust_resource_info(client_handle_t handle, adjust_t *adj);
+int pcmcia_adjust_resource_info(adjust_t *adj);
 
 #endif /* __KERNEL__ */
 



More information about the linux-pcmcia mailing list