[PATCH 12/15] pcmcia: remove useless indirection

Dominik Brodowski linux at dominikbrodowski.net
Wed Jan 6 06:46:23 EST 2010


As release_resoure_db() used to be called only from one place, and
it's a two-line function, remove it.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/cs.c          |    3 ++-
 drivers/pcmcia/cs_internal.h |    3 ---
 drivers/pcmcia/rsrc_mgr.c    |    6 ------
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index d5dce55..444d45a 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -283,7 +283,8 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)
 	up_write(&pcmcia_socket_list_rwsem);
 
 	/* wait for sysfs to drop all references */
-	release_resource_db(socket);
+	if (socket->resource_ops->exit)
+		socket->resource_ops->exit(socket);
 	wait_for_completion(&socket->socket_released);
 } /* pcmcia_unregister_socket */
 EXPORT_SYMBOL(pcmcia_unregister_socket);
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 0ef6b58..0419457 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -101,9 +101,6 @@ static inline void cs_socket_put(struct pcmcia_socket *skt)
 /* cistpl.c */
 int verify_cis_cache(struct pcmcia_socket *s);
 
-/* rsrc_mgr.c */
-void release_resource_db(struct pcmcia_socket *s);
-
 /* socket_sysfs.c */
 extern int pccard_sysfs_add_socket(struct device *dev);
 extern void pccard_sysfs_remove_socket(struct device *dev);
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index 52db172..66c7800 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -58,12 +58,6 @@ struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align,
 }
 EXPORT_SYMBOL(pcmcia_find_mem_region);
 
-void release_resource_db(struct pcmcia_socket *s)
-{
-	if (s->resource_ops->exit)
-		s->resource_ops->exit(s);
-}
-
 
 static int static_init(struct pcmcia_socket *s)
 {
-- 
1.6.3.3




More information about the linux-pcmcia mailing list