[PATCH 13/14] pcmcia: cleanups

Dominik Brodowski linux at dominikbrodowski.net
Sun Feb 27 05:11:52 EST 2005


From: Adrian Bunk <bunk at stusta.de>

This patch contains the following cleanups:
- make needlessly global code static
- remove the following unneeded EXPORT_SYMBOL's:
  - ds.c: pcmcia_report_error
  - ds.c: pcmcia_bus_type

Signed-off-by: Adrian Bunk <bunk at stusta.de>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

Index: 2.6.11-rc5/drivers/pcmcia/ds.c
===================================================================
--- 2.6.11-rc5.orig/drivers/pcmcia/ds.c	2005-02-27 08:54:46.000000000 +0100
+++ 2.6.11-rc5/drivers/pcmcia/ds.c	2005-02-27 08:54:47.000000000 +0100
@@ -60,7 +60,7 @@
 MODULE_LICENSE("GPL");
 
 #ifdef DEBUG
-int ds_pc_debug;
+static int ds_pc_debug;
 
 module_param_named(pc_debug, ds_pc_debug, int, 0644);
 
@@ -108,6 +108,8 @@
 };
 static spinlock_t pcmcia_dev_list_lock;
 
+static struct bus_type pcmcia_bus_type;
+
 #define DS_SOCKET_PRESENT		0x01
 #define DS_SOCKET_BUSY			0x02
 #define DS_SOCKET_REMOVAL_PENDING	0x10
@@ -218,7 +220,7 @@
 };
 
 
-int pcmcia_report_error(client_handle_t handle, error_info_t *err)
+static int pcmcia_report_error(client_handle_t handle, error_info_t *err)
 {
 	int i;
 	char *serv;
@@ -248,7 +250,6 @@
 
 	return CS_SUCCESS;
 } /* report_error */
-EXPORT_SYMBOL(pcmcia_report_error);
 
 /* end of code which was in cs.c before */
 
@@ -1877,13 +1878,12 @@
 };
 
 
-struct bus_type pcmcia_bus_type = {
+static struct bus_type pcmcia_bus_type = {
 	.name = "pcmcia",
 	.hotplug = pcmcia_bus_hotplug,
 	.match = pcmcia_bus_match,
 	.dev_attrs = pcmcia_dev_attrs,
 };
-EXPORT_SYMBOL(pcmcia_bus_type);
 
 
 static int __init init_pcmcia_bus(void)
Index: 2.6.11-rc5/drivers/pcmcia/rsrc_nonstatic.c
===================================================================
--- 2.6.11-rc5.orig/drivers/pcmcia/rsrc_nonstatic.c	2005-02-27 08:35:33.000000000 +0100
+++ 2.6.11-rc5/drivers/pcmcia/rsrc_nonstatic.c	2005-02-27 08:54:48.000000000 +0100
@@ -606,7 +606,7 @@
 
 ======================================================================*/
 
-struct resource *nonstatic_find_io_region(unsigned long base, int num,
+static struct resource *nonstatic_find_io_region(unsigned long base, int num,
 		   unsigned long align, struct pcmcia_socket *s)
 {
 	struct resource *res = make_resource(0, num, IORESOURCE_IO, s->dev.class_id);
@@ -640,8 +640,8 @@
 	return res;
 }
 
-struct resource * nonstatic_find_mem_region(u_long base, u_long num, u_long align,
-				 int low, struct pcmcia_socket *s)
+static struct resource * nonstatic_find_mem_region(u_long base, u_long num,
+		u_long align, int low, struct pcmcia_socket *s)
 {
 	struct resource *res = make_resource(0, num, IORESOURCE_MEM, s->dev.class_id);
 	struct socket_data *s_data = s->resource_data;
Index: 2.6.11-rc5/include/pcmcia/cs.h
===================================================================
--- 2.6.11-rc5.orig/include/pcmcia/cs.h	2005-02-27 08:35:33.000000000 +0100
+++ 2.6.11-rc5/include/pcmcia/cs.h	2005-02-27 08:54:48.000000000 +0100
@@ -417,7 +417,6 @@
 int pcmcia_resume_card(struct pcmcia_socket *skt);
 int pcmcia_eject_card(struct pcmcia_socket *skt);
 int pcmcia_insert_card(struct pcmcia_socket *skt);
-int pcmcia_report_error(client_handle_t handle, error_info_t *err);
 
 struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt);
 void pcmcia_put_socket(struct pcmcia_socket *skt);
Index: 2.6.11-rc5/include/pcmcia/ds.h
===================================================================
--- 2.6.11-rc5.orig/include/pcmcia/ds.h	2005-02-27 08:35:33.000000000 +0100
+++ 2.6.11-rc5/include/pcmcia/ds.h	2005-02-27 08:54:48.000000000 +0100
@@ -131,8 +131,6 @@
 
 struct pcmcia_socket;
 
-extern struct bus_type pcmcia_bus_type;
-
 struct pcmcia_driver {
 	dev_link_t		*(*attach)(void);
 	void			(*detach)(dev_link_t *);



More information about the linux-pcmcia mailing list