[RFC][4/5] move CardServices

Dominik Brodowski linux at brodo.de
Sat Nov 22 11:35:16 GMT 2003


CardServices and ReportError were only used by 16-bit PCMCIA devices. 
So, move them to ds.c.

 drivers/pcmcia/cs.c |  269 ---------------------------------------------------
 drivers/pcmcia/ds.c |  272 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/pcmcia/cs.h |    1
 3 files changed, 272 insertions(+), 270 deletions(-)


diff -ruN linux-original/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
--- linux-original/drivers/pcmcia/cs.c	2003-11-22 09:53:18.019330280 +0100
+++ linux/drivers/pcmcia/cs.c	2003-11-22 10:11:41.186623360 +0100
@@ -127,103 +127,6 @@
 LIST_HEAD(pcmcia_socket_list);
 DECLARE_RWSEM(pcmcia_socket_list_rwsem);
 
-/*====================================================================*/
-
-/* String tables for error messages */
-
-typedef struct lookup_t {
-    int key;
-    char *msg;
-} lookup_t;
-
-static const lookup_t error_table[] = {
-    { CS_SUCCESS,		"Operation succeeded" },
-    { CS_BAD_ADAPTER,		"Bad adapter" },
-    { CS_BAD_ATTRIBUTE, 	"Bad attribute", },
-    { CS_BAD_BASE,		"Bad base address" },
-    { CS_BAD_EDC,		"Bad EDC" },
-    { CS_BAD_IRQ,		"Bad IRQ" },
-    { CS_BAD_OFFSET,		"Bad offset" },
-    { CS_BAD_PAGE,		"Bad page number" },
-    { CS_READ_FAILURE,		"Read failure" },
-    { CS_BAD_SIZE,		"Bad size" },
-    { CS_BAD_SOCKET,		"Bad socket" },
-    { CS_BAD_TYPE,		"Bad type" },
-    { CS_BAD_VCC,		"Bad Vcc" },
-    { CS_BAD_VPP,		"Bad Vpp" },
-    { CS_BAD_WINDOW,		"Bad window" },
-    { CS_WRITE_FAILURE,		"Write failure" },
-    { CS_NO_CARD,		"No card present" },
-    { CS_UNSUPPORTED_FUNCTION,	"Usupported function" },
-    { CS_UNSUPPORTED_MODE,	"Unsupported mode" },
-    { CS_BAD_SPEED,		"Bad speed" },
-    { CS_BUSY,			"Resource busy" },
-    { CS_GENERAL_FAILURE,	"General failure" },
-    { CS_WRITE_PROTECTED,	"Write protected" },
-    { CS_BAD_ARG_LENGTH,	"Bad argument length" },
-    { CS_BAD_ARGS,		"Bad arguments" },
-    { CS_CONFIGURATION_LOCKED,	"Configuration locked" },
-    { CS_IN_USE,		"Resource in use" },
-    { CS_NO_MORE_ITEMS,		"No more items" },
-    { CS_OUT_OF_RESOURCE,	"Out of resource" },
-    { CS_BAD_HANDLE,		"Bad handle" },
-    { CS_BAD_TUPLE,		"Bad CIS tuple" }
-};
-#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t))
-
-static const lookup_t service_table[] = {
-    { AccessConfigurationRegister,	"AccessConfigurationRegister" },
-    { AddSocketServices,		"AddSocketServices" },
-    { AdjustResourceInfo,		"AdjustResourceInfo" },
-    { CheckEraseQueue,			"CheckEraseQueue" },
-    { CloseMemory,			"CloseMemory" },
-    { DeregisterClient,			"DeregisterClient" },
-    { DeregisterEraseQueue,		"DeregisterEraseQueue" },
-    { GetCardServicesInfo,		"GetCardServicesInfo" },
-    { GetClientInfo,			"GetClientInfo" },
-    { GetConfigurationInfo,		"GetConfigurationInfo" },
-    { GetEventMask,			"GetEventMask" },
-    { GetFirstClient,			"GetFirstClient" },
-    { GetFirstRegion,			"GetFirstRegion" },
-    { GetFirstTuple,			"GetFirstTuple" },
-    { GetNextClient,			"GetNextClient" },
-    { GetNextRegion,			"GetNextRegion" },
-    { GetNextTuple,			"GetNextTuple" },
-    { GetStatus,			"GetStatus" },
-    { GetTupleData,			"GetTupleData" },
-    { MapMemPage,			"MapMemPage" },
-    { ModifyConfiguration,		"ModifyConfiguration" },
-    { ModifyWindow,			"ModifyWindow" },
-    { OpenMemory,			"OpenMemory" },
-    { ParseTuple,			"ParseTuple" },
-    { ReadMemory,			"ReadMemory" },
-    { RegisterClient,			"RegisterClient" },
-    { RegisterEraseQueue,		"RegisterEraseQueue" },
-    { RegisterMTD,			"RegisterMTD" },
-    { ReleaseConfiguration,		"ReleaseConfiguration" },
-    { ReleaseIO,			"ReleaseIO" },
-    { ReleaseIRQ,			"ReleaseIRQ" },
-    { ReleaseWindow,			"ReleaseWindow" },
-    { RequestConfiguration,		"RequestConfiguration" },
-    { RequestIO,			"RequestIO" },
-    { RequestIRQ,			"RequestIRQ" },
-    { RequestSocketMask,		"RequestSocketMask" },
-    { RequestWindow,			"RequestWindow" },
-    { ResetCard,			"ResetCard" },
-    { SetEventMask,			"SetEventMask" },
-    { ValidateCIS,			"ValidateCIS" },
-    { WriteMemory,			"WriteMemory" },
-    { BindDevice,			"BindDevice" },
-    { BindMTD,				"BindMTD" },
-    { ReportError,			"ReportError" },
-    { SuspendCard,			"SuspendCard" },
-    { ResumeCard,			"ResumeCard" },
-    { EjectCard,			"EjectCard" },
-    { InsertCard,			"InsertCard" },
-    { ReplaceCIS,			"ReplaceCIS" }
-};
-#define SERVICE_COUNT (sizeof(service_table)/sizeof(lookup_t))
-
 
 /*====================================================================
 
@@ -2193,176 +2096,6 @@
     return CS_SUCCESS;
 } /* set_event_mask */
 
-/*====================================================================*/
-
-int pcmcia_report_error(client_handle_t handle, error_info_t *err)
-{
-    int i;
-    char *serv;
-
-    if (CHECK_HANDLE(handle))
-	printk(KERN_NOTICE);
-    else
-	printk(KERN_NOTICE "%s: ", handle->dev_info);
-    
-    for (i = 0; i < SERVICE_COUNT; i++)
-	if (service_table[i].key == err->func) break;
-    if (i < SERVICE_COUNT)
-	serv = service_table[i].msg;
-    else
-	serv = "Unknown service number";
-
-    for (i = 0; i < ERROR_COUNT; i++)
-	if (error_table[i].key == err->retcode) break;
-    if (i < ERROR_COUNT)
-	printk("%s: %s\n", serv, error_table[i].msg);
-    else
-	printk("%s: Unknown error code %#x\n", serv, err->retcode);
-
-    return CS_SUCCESS;
-} /* report_error */
-
-/*====================================================================*/
-
-int CardServices(int func, void *a1, void *a2, void *a3)
-{
-
-#ifdef PCMCIA_DEBUG
-    if (pc_debug > 2) {
-	int i;
-	for (i = 0; i < SERVICE_COUNT; i++)
-	    if (service_table[i].key == func) break;
-	if (i < SERVICE_COUNT)
-	    printk(KERN_DEBUG "cs: CardServices(%s, 0x%p, 0x%p)\n",
-		   service_table[i].msg, a1, a2);
-	else
-	    printk(KERN_DEBUG "cs: CardServices(Unknown func %d, "
-		   "0x%p, 0x%p)\n", func, a1, a2);
-    }
-#endif
-    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:
-	return pcmcia_close_memory(a1); break;
-    case CopyMemory:
-	return pcmcia_copy_memory(a1, a2); break;
-    case DeregisterClient:
-	return pcmcia_deregister_client(a1); break;
-    case DeregisterEraseQueue:
-	return pcmcia_deregister_erase_queue(a1); break;
-    case GetFirstClient:
-	return pcmcia_get_first_client(a1, a2); break;
-    case GetCardServicesInfo:
-	return pcmcia_get_card_services_info(a1); break;
-    case GetConfigurationInfo:
-	return pcmcia_get_configuration_info(a1, a2); break;
-    case GetNextClient:
-	return pcmcia_get_next_client(a1, a2); break;
-    case GetFirstRegion:
-	return pcmcia_get_first_region(a1, a2); break;
-    case GetFirstTuple:
-	return pcmcia_get_first_tuple(a1, a2); break;
-    case GetNextRegion:
-	return pcmcia_get_next_region(a1, a2); break;
-    case GetNextTuple:
-	return pcmcia_get_next_tuple(a1, a2); break;
-    case GetStatus:
-	return pcmcia_get_status(a1, a2); break;
-    case GetTupleData:
-	return pcmcia_get_tuple_data(a1, a2); break;
-    case MapMemPage:
-	return pcmcia_map_mem_page(a1, a2); break;
-    case ModifyConfiguration:
-	return pcmcia_modify_configuration(a1, a2); break;
-    case ModifyWindow:
-	return pcmcia_modify_window(a1, a2); break;
-    case OpenMemory:
-/*	return pcmcia_open_memory(a1, a2); */
-    {
-	memory_handle_t m;
-        int ret = pcmcia_open_memory(a1, a2, &m);
-        *(memory_handle_t *)a1 = m;
-	return  ret;
-    }
-        break;
-    case ParseTuple:
-	return pcmcia_parse_tuple(a1, a2, a3); break;
-    case ReadMemory:
-	return pcmcia_read_memory(a1, a2, a3); break;
-    case RegisterClient:
-	return pcmcia_register_client(a1, a2); break;
-    case RegisterEraseQueue:
-    {
-	eraseq_handle_t w;
-        int ret = pcmcia_register_erase_queue(a1, a2, &w);
-        *(eraseq_handle_t *)a1 = w;
-	return  ret;
-    }
-        break;
-/*	return pcmcia_register_erase_queue(a1, a2); break; */
-
-	return pcmcia_register_mtd(a1, a2); break;
-    case ReleaseConfiguration:
-	return pcmcia_release_configuration(a1); break;
-    case ReleaseIO:
-	return pcmcia_release_io(a1, a2); break;
-    case ReleaseIRQ:
-	return pcmcia_release_irq(a1, a2); break;
-    case ReleaseWindow:
-	return pcmcia_release_window(a1); break;
-    case RequestConfiguration:
-	return pcmcia_request_configuration(a1, a2); break;
-    case RequestIO:
-	return pcmcia_request_io(a1, a2); break;
-    case RequestIRQ:
-	return pcmcia_request_irq(a1, a2); break;
-    case RequestWindow:
-    {
-	window_handle_t w;
-        int ret = pcmcia_request_window(a1, a2, &w);
-        *(window_handle_t *)a1 = w;
-	return  ret;
-    }
-        break;
-    case ResetCard:
-	return pcmcia_reset_card(a1, a2); break;
-    case SetEventMask:
-	return pcmcia_set_event_mask(a1, a2); break;
-    case ValidateCIS:
-	return pcmcia_validate_cis(a1, a2); break;
-    case WriteMemory:
-	return pcmcia_write_memory(a1, a2, a3); break;
-    case BindDevice:
-    case BindMTD:
-	return -ENOSYS; break;
-    case ReportError:
-	return pcmcia_report_error(a1, a2); break;
-    case SuspendCard:
-	return pcmcia_suspend_card(a1, a2); break;
-    case ResumeCard:
-	return pcmcia_resume_card(a1, a2); break;
-    case EjectCard:
-	return pcmcia_eject_card(a1, a2); break;
-    case InsertCard:
-	return pcmcia_insert_card(a1, a2); break;
-    case ReplaceCIS:
-	return pcmcia_replace_cis(a1, a2); break;
-    case GetFirstWindow:
-	return pcmcia_get_first_window(a1, a2); break;
-    case GetNextWindow:
-	return pcmcia_get_next_window(a1, a2); break;
-    case GetMemPage:
-	return pcmcia_get_mem_page(a1, a2); break;
-    default:
-	return CS_UNSUPPORTED_FUNCTION; break;
-    }
-    
-} /* CardServices */
 
 /*======================================================================
 
@@ -2406,7 +2139,6 @@
 EXPORT_SYMBOL(pcmcia_release_irq);
 EXPORT_SYMBOL(pcmcia_release_window);
 EXPORT_SYMBOL(pcmcia_replace_cis);
-EXPORT_SYMBOL(pcmcia_report_error);
 EXPORT_SYMBOL(pcmcia_request_configuration);
 EXPORT_SYMBOL(pcmcia_request_io);
 EXPORT_SYMBOL(pcmcia_request_irq);
@@ -2419,7 +2151,6 @@
 EXPORT_SYMBOL(pcmcia_write_memory);
 
 EXPORT_SYMBOL(dead_socket);
-EXPORT_SYMBOL(CardServices);
 EXPORT_SYMBOL(MTDHelperEntry);
 EXPORT_SYMBOL(pcmcia_parse_events);
 
diff -ruN linux-original/drivers/pcmcia/ds.c linux/drivers/pcmcia/ds.c
--- linux-original/drivers/pcmcia/ds.c	2003-11-22 09:53:18.019330280 +0100
+++ linux/drivers/pcmcia/ds.c	2003-11-22 10:11:41.186623360 +0100
@@ -51,6 +51,7 @@
 #include <linux/list.h>
 #include <linux/workqueue.h>
 
+#define IN_CARD_SERVICES
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
@@ -123,6 +124,8 @@
 
 /*====================================================================*/
 
+static int pcmcia_report_error(client_handle_t handle, error_info_t *err);
+
 void cs_error(client_handle_t handle, int func, int ret)
 {
 	error_info_t err = { func, ret };
@@ -210,6 +213,275 @@
 } /* bind_mtd */
 
 
+/* String tables for error messages */
+
+typedef struct lookup_t {
+    int key;
+    char *msg;
+} lookup_t;
+
+static const lookup_t error_table[] = {
+    { CS_SUCCESS,		"Operation succeeded" },
+    { CS_BAD_ADAPTER,		"Bad adapter" },
+    { CS_BAD_ATTRIBUTE, 	"Bad attribute", },
+    { CS_BAD_BASE,		"Bad base address" },
+    { CS_BAD_EDC,		"Bad EDC" },
+    { CS_BAD_IRQ,		"Bad IRQ" },
+    { CS_BAD_OFFSET,		"Bad offset" },
+    { CS_BAD_PAGE,		"Bad page number" },
+    { CS_READ_FAILURE,		"Read failure" },
+    { CS_BAD_SIZE,		"Bad size" },
+    { CS_BAD_SOCKET,		"Bad socket" },
+    { CS_BAD_TYPE,		"Bad type" },
+    { CS_BAD_VCC,		"Bad Vcc" },
+    { CS_BAD_VPP,		"Bad Vpp" },
+    { CS_BAD_WINDOW,		"Bad window" },
+    { CS_WRITE_FAILURE,		"Write failure" },
+    { CS_NO_CARD,		"No card present" },
+    { CS_UNSUPPORTED_FUNCTION,	"Usupported function" },
+    { CS_UNSUPPORTED_MODE,	"Unsupported mode" },
+    { CS_BAD_SPEED,		"Bad speed" },
+    { CS_BUSY,			"Resource busy" },
+    { CS_GENERAL_FAILURE,	"General failure" },
+    { CS_WRITE_PROTECTED,	"Write protected" },
+    { CS_BAD_ARG_LENGTH,	"Bad argument length" },
+    { CS_BAD_ARGS,		"Bad arguments" },
+    { CS_CONFIGURATION_LOCKED,	"Configuration locked" },
+    { CS_IN_USE,		"Resource in use" },
+    { CS_NO_MORE_ITEMS,		"No more items" },
+    { CS_OUT_OF_RESOURCE,	"Out of resource" },
+    { CS_BAD_HANDLE,		"Bad handle" },
+    { CS_BAD_TUPLE,		"Bad CIS tuple" }
+};
+#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t))
+
+
+static const lookup_t service_table[] = {
+    { AccessConfigurationRegister,	"AccessConfigurationRegister" },
+    { AddSocketServices,		"AddSocketServices" },
+    { AdjustResourceInfo,		"AdjustResourceInfo" },
+    { CheckEraseQueue,			"CheckEraseQueue" },
+    { CloseMemory,			"CloseMemory" },
+    { DeregisterClient,			"DeregisterClient" },
+    { DeregisterEraseQueue,		"DeregisterEraseQueue" },
+    { GetCardServicesInfo,		"GetCardServicesInfo" },
+    { GetClientInfo,			"GetClientInfo" },
+    { GetConfigurationInfo,		"GetConfigurationInfo" },
+    { GetEventMask,			"GetEventMask" },
+    { GetFirstClient,			"GetFirstClient" },
+    { GetFirstRegion,			"GetFirstRegion" },
+    { GetFirstTuple,			"GetFirstTuple" },
+    { GetNextClient,			"GetNextClient" },
+    { GetNextRegion,			"GetNextRegion" },
+    { GetNextTuple,			"GetNextTuple" },
+    { GetStatus,			"GetStatus" },
+    { GetTupleData,			"GetTupleData" },
+    { MapMemPage,			"MapMemPage" },
+    { ModifyConfiguration,		"ModifyConfiguration" },
+    { ModifyWindow,			"ModifyWindow" },
+    { OpenMemory,			"OpenMemory" },
+    { ParseTuple,			"ParseTuple" },
+    { ReadMemory,			"ReadMemory" },
+    { RegisterClient,			"RegisterClient" },
+    { RegisterEraseQueue,		"RegisterEraseQueue" },
+    { RegisterMTD,			"RegisterMTD" },
+    { ReleaseConfiguration,		"ReleaseConfiguration" },
+    { ReleaseIO,			"ReleaseIO" },
+    { ReleaseIRQ,			"ReleaseIRQ" },
+    { ReleaseWindow,			"ReleaseWindow" },
+    { RequestConfiguration,		"RequestConfiguration" },
+    { RequestIO,			"RequestIO" },
+    { RequestIRQ,			"RequestIRQ" },
+    { RequestSocketMask,		"RequestSocketMask" },
+    { RequestWindow,			"RequestWindow" },
+    { ResetCard,			"ResetCard" },
+    { SetEventMask,			"SetEventMask" },
+    { ValidateCIS,			"ValidateCIS" },
+    { WriteMemory,			"WriteMemory" },
+    { BindDevice,			"BindDevice" },
+    { BindMTD,				"BindMTD" },
+    { ReportError,			"ReportError" },
+    { SuspendCard,			"SuspendCard" },
+    { ResumeCard,			"ResumeCard" },
+    { EjectCard,			"EjectCard" },
+    { InsertCard,			"InsertCard" },
+    { ReplaceCIS,			"ReplaceCIS" }
+};
+#define SERVICE_COUNT (sizeof(service_table)/sizeof(lookup_t))
+
+
+static int pcmcia_report_error(client_handle_t handle, error_info_t *err)
+{
+	int i;
+	char *serv;
+
+	if (CHECK_HANDLE(handle))
+		printk(KERN_NOTICE);
+	else
+		printk(KERN_NOTICE "%s: ", handle->dev_info);
+
+	for (i = 0; i < SERVICE_COUNT; i++)
+		if (service_table[i].key == err->func) break;
+	if (i < SERVICE_COUNT)
+		serv = service_table[i].msg;
+	else
+		serv = "Unknown service number";
+
+	for (i = 0; i < ERROR_COUNT; i++)
+		if (error_table[i].key == err->retcode) break;
+	if (i < ERROR_COUNT)
+		printk("%s: %s\n", serv, error_table[i].msg);
+	else
+		printk("%s: Unknown error code %#x\n", serv, err->retcode);
+
+	return CS_SUCCESS;
+} /* report_error */
+
+
+
+int CardServices(int func, void *a1, void *a2, void *a3)
+{
+
+#ifdef PCMCIA_DEBUG
+	if (pc_debug > 2) {
+		int i;
+		for (i = 0; i < SERVICE_COUNT; i++)
+			if (service_table[i].key == func)
+				break;
+		if (i < SERVICE_COUNT)
+			printk(KERN_DEBUG "ds: CardServices(%s, 0x%p, 0x%p)\n",
+			       service_table[i].msg, a1, a2);
+		else
+			printk(KERN_DEBUG "ds: CardServices(Unknown func %d, "
+			       "0x%p, 0x%p)\n", func, a1, a2);
+	}
+#endif
+	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:
+		return pcmcia_close_memory(a1); break;
+	case CopyMemory:
+		return pcmcia_copy_memory(a1, a2); break;
+	case DeregisterClient:
+		return pcmcia_deregister_client(a1); break;
+	case DeregisterEraseQueue:
+		return pcmcia_deregister_erase_queue(a1); break;
+	case GetFirstClient:
+		return pcmcia_get_first_client(a1, a2); break;
+	case GetCardServicesInfo:
+		return pcmcia_get_card_services_info(a1); break;
+	case GetConfigurationInfo:
+		return pcmcia_get_configuration_info(a1, a2); break;
+	case GetNextClient:
+		return pcmcia_get_next_client(a1, a2); break;
+	case GetFirstRegion:
+		return pcmcia_get_first_region(a1, a2); break;
+	case GetFirstTuple:
+		return pcmcia_get_first_tuple(a1, a2); break;
+	case GetNextRegion:
+		return pcmcia_get_next_region(a1, a2); break;
+	case GetNextTuple:
+		return pcmcia_get_next_tuple(a1, a2); break;
+	case GetStatus:
+		return pcmcia_get_status(a1, a2); break;
+	case GetTupleData:
+		return pcmcia_get_tuple_data(a1, a2); break;
+	case MapMemPage:
+		return pcmcia_map_mem_page(a1, a2); break;
+	case ModifyConfiguration:
+		return pcmcia_modify_configuration(a1, a2); break;
+	case ModifyWindow:
+		return pcmcia_modify_window(a1, a2); break;
+	case OpenMemory:
+/*	return pcmcia_open_memory(a1, a2); */
+	{
+		memory_handle_t m;
+		int ret = pcmcia_open_memory(a1, a2, &m);
+		*(memory_handle_t *)a1 = m;
+		return  ret;
+	}
+        break;
+	case ParseTuple:
+		return pcmcia_parse_tuple(a1, a2, a3); break;
+	case ReadMemory:
+		return pcmcia_read_memory(a1, a2, a3); break;
+	case RegisterClient:
+		return pcmcia_register_client(a1, a2); break;
+	case RegisterEraseQueue:
+	{
+		eraseq_handle_t w;
+		int ret = pcmcia_register_erase_queue(a1, a2, &w);
+		*(eraseq_handle_t *)a1 = w;
+		return  ret;
+	}
+        break;
+/*	return pcmcia_register_erase_queue(a1, a2); break; */
+	
+	return pcmcia_register_mtd(a1, a2); break;
+	case ReleaseConfiguration:
+		return pcmcia_release_configuration(a1); break;
+	case ReleaseIO:
+		return pcmcia_release_io(a1, a2); break;
+	case ReleaseIRQ:
+		return pcmcia_release_irq(a1, a2); break;
+	case ReleaseWindow:
+		return pcmcia_release_window(a1); break;
+	case RequestConfiguration:
+		return pcmcia_request_configuration(a1, a2); break;
+	case RequestIO:
+		return pcmcia_request_io(a1, a2); break;
+	case RequestIRQ:
+		return pcmcia_request_irq(a1, a2); break;
+	case RequestWindow:
+	{
+		window_handle_t w;
+		int ret = pcmcia_request_window(a1, a2, &w);
+		*(window_handle_t *)a1 = w;
+		return  ret;
+	}
+        break;
+	case ResetCard:
+		return pcmcia_reset_card(a1, a2); break;
+	case SetEventMask:
+		return pcmcia_set_event_mask(a1, a2); break;
+	case ValidateCIS:
+		return pcmcia_validate_cis(a1, a2); break;
+	case WriteMemory:
+		return pcmcia_write_memory(a1, a2, a3); break;
+	case ReportError:
+		return pcmcia_report_error(a1, a2); break;
+	case SuspendCard:
+		return pcmcia_suspend_card(a1, a2); break;
+	case ResumeCard:
+		return pcmcia_resume_card(a1, a2); break;
+	case EjectCard:
+		return pcmcia_eject_card(a1, a2); break;
+	case InsertCard:
+		return pcmcia_insert_card(a1, a2); break;
+	case ReplaceCIS:
+		return pcmcia_replace_cis(a1, a2); break;
+	case GetFirstWindow:
+		return pcmcia_get_first_window(a1, a2); break;
+	case GetNextWindow:
+		return pcmcia_get_next_window(a1, a2); break;
+	case GetMemPage:
+		return pcmcia_get_mem_page(a1, a2); break;
+	case BindDevice:
+	case BindMTD:
+		return -ENOSYS; break;
+	default:
+		return CS_UNSUPPORTED_FUNCTION; break;
+    }
+    
+} /* CardServices */
+EXPORT_SYMBOL(CardServices);
+
+
 /* end of code which was in cs.c before */
 
 /*======================================================================*/
diff -ruN linux-original/include/pcmcia/cs.h linux/include/pcmcia/cs.h
--- linux-original/include/pcmcia/cs.h	2003-11-22 09:53:18.020330128 +0100
+++ linux/include/pcmcia/cs.h	2003-11-22 10:11:41.188623056 +0100
@@ -456,7 +456,6 @@
 int pcmcia_eject_card(client_handle_t handle, client_req_t *req);
 int pcmcia_insert_card(client_handle_t handle, client_req_t *req);
 int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask);
-int pcmcia_report_error(client_handle_t handle, error_info_t *err);
 struct pci_bus *pcmcia_lookup_bus(client_handle_t handle);
 
 /* rsrc_mgr.c */



More information about the linux-pcmcia mailing list