aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-06 05:32:22 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-01-24 13:57:55 -0500
commitf9c316f4a2d32e4d03497ecb24e1d2309361a5b8 (patch)
tree4d8917dcb51605ccb72eb49a8e6f3340e39b9f72
parent385ee871092a524869c71a8180888aadcd6ca36d (diff)
pcmcia: remove some rsrc_mgr indirections
Remove rsrc_mgr indirections only used by pcmcia_resource.c Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/pcmcia/cs_internal.h8
-rw-r--r--drivers/pcmcia/pcmcia_resource.c17
-rw-r--r--drivers/pcmcia/rsrc_mgr.c18
3 files changed, 17 insertions, 26 deletions
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 7f86d09a5830..ad05e3b59473 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -168,14 +168,6 @@ int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple);
168 168
169/* rsrc_mgr.c */ 169/* rsrc_mgr.c */
170int pcmcia_validate_mem(struct pcmcia_socket *s); 170int pcmcia_validate_mem(struct pcmcia_socket *s);
171struct resource *pcmcia_find_io_region(unsigned long base,
172 int num,
173 unsigned long align,
174 struct pcmcia_socket *s);
175int pcmcia_adjust_io_region(struct resource *res,
176 unsigned long r_start,
177 unsigned long r_end,
178 struct pcmcia_socket *s);
179struct resource *pcmcia_find_mem_region(u_long base, 171struct resource *pcmcia_find_mem_region(u_long base,
180 u_long num, 172 u_long num,
181 u_long align, 173 u_long align,
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index d5db95644b64..880b0b63b6a3 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -43,6 +43,23 @@ module_param(io_speed, int, 0444);
43static u8 pcmcia_used_irq[NR_IRQS]; 43static u8 pcmcia_used_irq[NR_IRQS];
44#endif 44#endif
45 45
46static int pcmcia_adjust_io_region(struct resource *res, unsigned long start,
47 unsigned long end, struct pcmcia_socket *s)
48{
49 if (s->resource_ops->adjust_io_region)
50 return s->resource_ops->adjust_io_region(res, start, end, s);
51 return -ENOMEM;
52}
53
54static struct resource *pcmcia_find_io_region(unsigned long base, int num,
55 unsigned long align,
56 struct pcmcia_socket *s)
57{
58 if (s->resource_ops->find_io)
59 return s->resource_ops->find_io(base, num, align, s);
60 return NULL;
61}
62
46 63
47/** alloc_io_space 64/** alloc_io_space
48 * 65 *
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index 66c780073cd2..81540c420bbd 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -31,24 +31,6 @@ int pcmcia_validate_mem(struct pcmcia_socket *s)
31} 31}
32EXPORT_SYMBOL(pcmcia_validate_mem); 32EXPORT_SYMBOL(pcmcia_validate_mem);
33 33
34int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start,
35 unsigned long r_end, struct pcmcia_socket *s)
36{
37 if (s->resource_ops->adjust_io_region)
38 return s->resource_ops->adjust_io_region(res, r_start, r_end, s);
39 return -ENOMEM;
40}
41EXPORT_SYMBOL(pcmcia_adjust_io_region);
42
43struct resource *pcmcia_find_io_region(unsigned long base, int num,
44 unsigned long align, struct pcmcia_socket *s)
45{
46 if (s->resource_ops->find_io)
47 return s->resource_ops->find_io(base, num, align, s);
48 return NULL;
49}
50EXPORT_SYMBOL(pcmcia_find_io_region);
51
52struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, 34struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align,
53 int low, struct pcmcia_socket *s) 35 int low, struct pcmcia_socket *s)
54{ 36{