From: Dominik Brodowski <linux@dominikbrodowski.net>

Clean up ds.c

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/pcmcia/pcmcia_compat.c   |   34 -----------------
 25-akpm/drivers/pcmcia/pcmcia_ioctl.c    |   23 +++++++++++
 25-akpm/drivers/pcmcia/pcmcia_resource.c |   62 +++++++++++++++++--------------
 25-akpm/include/pcmcia/cs.h              |    1 
 4 files changed, 58 insertions(+), 62 deletions(-)

diff -puN drivers/pcmcia/pcmcia_compat.c~pcmcia-dsc-cleanup drivers/pcmcia/pcmcia_compat.c
--- 25/drivers/pcmcia/pcmcia_compat.c~pcmcia-dsc-cleanup	2005-03-20 15:59:48.000000000 -0800
+++ 25-akpm/drivers/pcmcia/pcmcia_compat.c	2005-03-20 15:59:48.000000000 -0800
@@ -74,19 +74,6 @@ int pcmcia_validate_cis(client_handle_t 
 }
 EXPORT_SYMBOL(pcmcia_validate_cis);
 
-int pcmcia_get_configuration_info(client_handle_t handle,
-				  config_info_t *config)
-{
-	struct pcmcia_socket *s;
-
-	if ((CHECK_HANDLE(handle)) || !config)
-		return CS_BAD_HANDLE;
-	s = SOCKET(handle);
-	if (!s)
-		return CS_BAD_HANDLE;
-	return pccard_get_configuration_info(s, handle->Function, config);
-}
-EXPORT_SYMBOL(pcmcia_get_configuration_info);
 
 int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
 {
@@ -102,24 +89,3 @@ int pcmcia_reset_card(client_handle_t ha
 }
 EXPORT_SYMBOL(pcmcia_reset_card);
 
-int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
-{
-	struct pcmcia_socket *s;
-	if (CHECK_HANDLE(handle))
-		return CS_BAD_HANDLE;
-	s = SOCKET(handle);
-	return pccard_get_status(s, handle->Function, status);
-}
-EXPORT_SYMBOL(pcmcia_get_status);
-
-int pcmcia_access_configuration_register(client_handle_t handle,
-					 conf_reg_t *reg)
-{
-	struct pcmcia_socket *s;
-	if (CHECK_HANDLE(handle))
-		return CS_BAD_HANDLE;
-	s = SOCKET(handle);
-	return pccard_access_configuration_register(s, handle->Function, reg);
-}
-EXPORT_SYMBOL(pcmcia_access_configuration_register);
-
diff -puN drivers/pcmcia/pcmcia_ioctl.c~pcmcia-dsc-cleanup drivers/pcmcia/pcmcia_ioctl.c
--- 25/drivers/pcmcia/pcmcia_ioctl.c~pcmcia-dsc-cleanup	2005-03-20 15:59:48.000000000 -0800
+++ 25-akpm/drivers/pcmcia/pcmcia_ioctl.c	2005-03-20 15:59:48.000000000 -0800
@@ -71,6 +71,29 @@ extern int ds_pc_debug;
 #define ds_dbg(lvl, fmt, arg...) do { } while (0)
 #endif
 
+static const char *release = "Linux Kernel Card Services";
+
+/** pcmcia_get_card_services_info
+ *
+ * Return information about this version of Card Services
+ */
+static int pcmcia_get_card_services_info(servinfo_t *info)
+{
+	unsigned int socket_count = 0;
+	struct list_head *tmp;
+	info->Signature[0] = 'C';
+	info->Signature[1] = 'S';
+	down_read(&pcmcia_socket_list_rwsem);
+	list_for_each(tmp, &pcmcia_socket_list)
+		socket_count++;
+	up_read(&pcmcia_socket_list_rwsem);
+	info->Count = socket_count;
+	info->Revision = CS_RELEASE_CODE;
+	info->CSLevel = 0x0210;
+	info->VendorString = (char *)release;
+	return CS_SUCCESS;
+} /* get_card_services_info */
+
 
 /* backwards-compatible accessing of driver --- by name! */
 
diff -puN drivers/pcmcia/pcmcia_resource.c~pcmcia-dsc-cleanup drivers/pcmcia/pcmcia_resource.c
--- 25/drivers/pcmcia/pcmcia_resource.c~pcmcia-dsc-cleanup	2005-03-20 15:59:48.000000000 -0800
+++ 25-akpm/drivers/pcmcia/pcmcia_resource.c	2005-03-20 15:59:48.000000000 -0800
@@ -36,8 +36,6 @@
 #include "ds_internal.h"
 
 
-static const char *release = "Linux Kernel Card Services";
-
 /* Access speed for IO windows */
 static int io_speed = 0;
 module_param(io_speed, int, 0444);
@@ -202,7 +200,18 @@ int pccard_access_configuration_register
 	}
 	return CS_SUCCESS;
 } /* pccard_access_configuration_register */
-EXPORT_SYMBOL(pccard_access_configuration_register);
+
+int pcmcia_access_configuration_register(client_handle_t handle,
+					 conf_reg_t *reg)
+{
+	struct pcmcia_socket *s;
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	s = SOCKET(handle);
+	return pccard_access_configuration_register(s, handle->Function, reg);
+}
+EXPORT_SYMBOL(pcmcia_access_configuration_register);
+
 
 
 int pccard_get_configuration_info(struct pcmcia_socket *s,
@@ -260,31 +269,20 @@ int pccard_get_configuration_info(struct
 
 	return CS_SUCCESS;
 } /* pccard_get_configuration_info */
-EXPORT_SYMBOL(pccard_get_configuration_info);
 
-
-/** pcmcia_get_card_services_info
- *
- * Return information about this version of Card Services
- */
-
-int pcmcia_get_card_services_info(servinfo_t *info)
+int pcmcia_get_configuration_info(client_handle_t handle,
+				  config_info_t *config)
 {
-	unsigned int socket_count = 0;
-	struct list_head *tmp;
-	info->Signature[0] = 'C';
-	info->Signature[1] = 'S';
-	down_read(&pcmcia_socket_list_rwsem);
-	list_for_each(tmp, &pcmcia_socket_list)
-		socket_count++;
-	up_read(&pcmcia_socket_list_rwsem);
-	info->Count = socket_count;
-	info->Revision = CS_RELEASE_CODE;
-	info->CSLevel = 0x0210;
-	info->VendorString = (char *)release;
-	return CS_SUCCESS;
-} /* get_card_services_info */
-EXPORT_SYMBOL(pcmcia_get_card_services_info);
+	struct pcmcia_socket *s;
+
+	if ((CHECK_HANDLE(handle)) || !config)
+		return CS_BAD_HANDLE;
+	s = SOCKET(handle);
+	if (!s)
+		return CS_BAD_HANDLE;
+	return pccard_get_configuration_info(s, handle->Function, config);
+}
+EXPORT_SYMBOL(pcmcia_get_configuration_info);
 
 
 /** pcmcia_get_window
@@ -379,7 +377,17 @@ int pccard_get_status(struct pcmcia_sock
 		(val & SS_READY) ? CS_EVENT_READY_CHANGE : 0;
 	return CS_SUCCESS;
 } /* pccard_get_status */
-EXPORT_SYMBOL(pccard_get_status);
+
+int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
+{
+	struct pcmcia_socket *s;
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	s = SOCKET(handle);
+	return pccard_get_status(s, handle->Function, status);
+}
+EXPORT_SYMBOL(pcmcia_get_status);
+
 
 
 /** pcmcia_get_mem_page
diff -puN include/pcmcia/cs.h~pcmcia-dsc-cleanup include/pcmcia/cs.h
--- 25/include/pcmcia/cs.h~pcmcia-dsc-cleanup	2005-03-20 15:59:48.000000000 -0800
+++ 25-akpm/include/pcmcia/cs.h	2005-03-20 15:59:48.000000000 -0800
@@ -396,7 +396,6 @@ struct pcmcia_socket;
 int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg);
 int pcmcia_deregister_client(client_handle_t handle);
 int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config);
-int pcmcia_get_card_services_info(servinfo_t *info);
 int pcmcia_get_first_window(window_handle_t *win, win_req_t *req);
 int pcmcia_get_next_window(window_handle_t *win, win_req_t *req);
 int pcmcia_get_status(client_handle_t handle, cs_status_t *status);
_