diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-06 08:03:03 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-02-17 11:37:31 -0500 |
commit | a3ac9af56c14c366a76fb4916995e57392c7b7d5 (patch) | |
tree | 5e3bcfa600f33d6327347c8bb567d1196371879d /drivers/pcmcia | |
parent | 6e7b51a733fde86d3be748543215a69da04d5bb7 (diff) |
pcmcia: remove remaining rsrc_mgr indirections
Move rsrc_mgr indirections only used by the pcmcia module to the
pcmcia module.
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cs_internal.h | 15 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 16 | ||||
-rw-r--r-- | drivers/pcmcia/rsrc_mgr.c | 20 |
3 files changed, 23 insertions, 28 deletions
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h index 3f438afdcd4e..76ac4444f0e0 100644 --- a/drivers/pcmcia/cs_internal.h +++ b/drivers/pcmcia/cs_internal.h | |||
@@ -133,14 +133,6 @@ int pcmcia_insert_card(struct pcmcia_socket *skt); | |||
133 | struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt); | 133 | struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt); |
134 | void pcmcia_put_socket(struct pcmcia_socket *skt); | 134 | void pcmcia_put_socket(struct pcmcia_socket *skt); |
135 | 135 | ||
136 | /* rsrc_mgr.c */ | ||
137 | int pcmcia_validate_mem(struct pcmcia_socket *s); | ||
138 | struct resource *pcmcia_find_mem_region(u_long base, | ||
139 | u_long num, | ||
140 | u_long align, | ||
141 | int low, | ||
142 | struct pcmcia_socket *s); | ||
143 | |||
144 | /* | 136 | /* |
145 | * Stuff internal to module "pcmcia". | 137 | * Stuff internal to module "pcmcia". |
146 | */ | 138 | */ |
@@ -149,6 +141,13 @@ extern struct bus_type pcmcia_bus_type; | |||
149 | 141 | ||
150 | /* pcmcia_resource.c */ | 142 | /* pcmcia_resource.c */ |
151 | extern int pcmcia_release_configuration(struct pcmcia_device *p_dev); | 143 | extern int pcmcia_release_configuration(struct pcmcia_device *p_dev); |
144 | extern int pcmcia_validate_mem(struct pcmcia_socket *s); | ||
145 | extern struct resource *pcmcia_find_mem_region(u_long base, | ||
146 | u_long num, | ||
147 | u_long align, | ||
148 | int low, | ||
149 | struct pcmcia_socket *s); | ||
150 | |||
152 | 151 | ||
153 | /* cistpl.c */ | 152 | /* cistpl.c */ |
154 | extern struct bin_attribute pccard_cis_attr; | 153 | extern struct bin_attribute pccard_cis_attr; |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 880b0b63b6a3..8ceb7abc580a 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -60,6 +60,22 @@ static struct resource *pcmcia_find_io_region(unsigned long base, int num, | |||
60 | return NULL; | 60 | return NULL; |
61 | } | 61 | } |
62 | 62 | ||
63 | int pcmcia_validate_mem(struct pcmcia_socket *s) | ||
64 | { | ||
65 | if (s->resource_ops->validate_mem) | ||
66 | return s->resource_ops->validate_mem(s); | ||
67 | /* if there is no callback, we can assume that everything is OK */ | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, | ||
72 | int low, struct pcmcia_socket *s) | ||
73 | { | ||
74 | if (s->resource_ops->find_mem) | ||
75 | return s->resource_ops->find_mem(base, num, align, low, s); | ||
76 | return NULL; | ||
77 | } | ||
78 | |||
63 | 79 | ||
64 | /** alloc_io_space | 80 | /** alloc_io_space |
65 | * | 81 | * |
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c index 81540c420bbd..cdd30c180066 100644 --- a/drivers/pcmcia/rsrc_mgr.c +++ b/drivers/pcmcia/rsrc_mgr.c | |||
@@ -21,26 +21,6 @@ | |||
21 | #include <pcmcia/cistpl.h> | 21 | #include <pcmcia/cistpl.h> |
22 | #include "cs_internal.h" | 22 | #include "cs_internal.h" |
23 | 23 | ||
24 | |||
25 | int pcmcia_validate_mem(struct pcmcia_socket *s) | ||
26 | { | ||
27 | if (s->resource_ops->validate_mem) | ||
28 | return s->resource_ops->validate_mem(s); | ||
29 | /* if there is no callback, we can assume that everything is OK */ | ||
30 | return 0; | ||
31 | } | ||
32 | EXPORT_SYMBOL(pcmcia_validate_mem); | ||
33 | |||
34 | struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, | ||
35 | int low, struct pcmcia_socket *s) | ||
36 | { | ||
37 | if (s->resource_ops->find_mem) | ||
38 | return s->resource_ops->find_mem(base, num, align, low, s); | ||
39 | return NULL; | ||
40 | } | ||
41 | EXPORT_SYMBOL(pcmcia_find_mem_region); | ||
42 | |||
43 | |||
44 | static int static_init(struct pcmcia_socket *s) | 24 | static int static_init(struct pcmcia_socket *s) |
45 | { | 25 | { |
46 | unsigned long flags; | 26 | unsigned long flags; |