diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-02 11:00:46 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:16:05 -0400 |
commit | 64f346425175ad33812cd693fbca48cd512dab63 (patch) | |
tree | 3ee3b0927b515de000d2c33fdc68bf9a9f4d4b12 /drivers/pcmcia/pcmcia_resource.c | |
parent | ef313e36d8896a42fc567a83a5d4b86821634e8d (diff) |
pcmcia: move pccard_get_configuration_info to ioctl
With the PCMCIA ioctl being the only remaining user of
_get_configuration_info, move the function to pcmcia_ioctl.c
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 9afe420c41f4..c5a2b005091c 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -197,85 +197,6 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, | |||
197 | EXPORT_SYMBOL(pcmcia_access_configuration_register); | 197 | EXPORT_SYMBOL(pcmcia_access_configuration_register); |
198 | 198 | ||
199 | 199 | ||
200 | int pccard_get_configuration_info(struct pcmcia_socket *s, | ||
201 | struct pcmcia_device *p_dev, | ||
202 | config_info_t *config) | ||
203 | { | ||
204 | config_t *c; | ||
205 | |||
206 | if (!(s->state & SOCKET_PRESENT)) | ||
207 | return CS_NO_CARD; | ||
208 | |||
209 | |||
210 | #ifdef CONFIG_CARDBUS | ||
211 | if (s->state & SOCKET_CARDBUS) { | ||
212 | memset(config, 0, sizeof(config_info_t)); | ||
213 | config->Vcc = s->socket.Vcc; | ||
214 | config->Vpp1 = config->Vpp2 = s->socket.Vpp; | ||
215 | config->Option = s->cb_dev->subordinate->number; | ||
216 | if (s->state & SOCKET_CARDBUS_CONFIG) { | ||
217 | config->Attributes = CONF_VALID_CLIENT; | ||
218 | config->IntType = INT_CARDBUS; | ||
219 | config->AssignedIRQ = s->irq.AssignedIRQ; | ||
220 | if (config->AssignedIRQ) | ||
221 | config->Attributes |= CONF_ENABLE_IRQ; | ||
222 | if (s->io[0].res) { | ||
223 | config->BasePort1 = s->io[0].res->start; | ||
224 | config->NumPorts1 = s->io[0].res->end - config->BasePort1 + 1; | ||
225 | } | ||
226 | } | ||
227 | return CS_SUCCESS; | ||
228 | } | ||
229 | #endif | ||
230 | |||
231 | if (p_dev) { | ||
232 | c = p_dev->function_config; | ||
233 | config->Function = p_dev->func; | ||
234 | } else { | ||
235 | c = NULL; | ||
236 | config->Function = 0; | ||
237 | } | ||
238 | |||
239 | if ((c == NULL) || !(c->state & CONFIG_LOCKED)) { | ||
240 | config->Attributes = 0; | ||
241 | config->Vcc = s->socket.Vcc; | ||
242 | config->Vpp1 = config->Vpp2 = s->socket.Vpp; | ||
243 | return CS_SUCCESS; | ||
244 | } | ||
245 | |||
246 | config->Attributes = c->Attributes | CONF_VALID_CLIENT; | ||
247 | config->Vcc = s->socket.Vcc; | ||
248 | config->Vpp1 = config->Vpp2 = s->socket.Vpp; | ||
249 | config->IntType = c->IntType; | ||
250 | config->ConfigBase = c->ConfigBase; | ||
251 | config->Status = c->Status; | ||
252 | config->Pin = c->Pin; | ||
253 | config->Copy = c->Copy; | ||
254 | config->Option = c->Option; | ||
255 | config->ExtStatus = c->ExtStatus; | ||
256 | config->Present = config->CardValues = c->CardValues; | ||
257 | config->IRQAttributes = c->irq.Attributes; | ||
258 | config->AssignedIRQ = s->irq.AssignedIRQ; | ||
259 | config->BasePort1 = c->io.BasePort1; | ||
260 | config->NumPorts1 = c->io.NumPorts1; | ||
261 | config->Attributes1 = c->io.Attributes1; | ||
262 | config->BasePort2 = c->io.BasePort2; | ||
263 | config->NumPorts2 = c->io.NumPorts2; | ||
264 | config->Attributes2 = c->io.Attributes2; | ||
265 | config->IOAddrLines = c->io.IOAddrLines; | ||
266 | |||
267 | return CS_SUCCESS; | ||
268 | } /* pccard_get_configuration_info */ | ||
269 | |||
270 | int pcmcia_get_configuration_info(struct pcmcia_device *p_dev, | ||
271 | config_info_t *config) | ||
272 | { | ||
273 | return pccard_get_configuration_info(p_dev->socket, p_dev, | ||
274 | config); | ||
275 | } | ||
276 | EXPORT_SYMBOL(pcmcia_get_configuration_info); | ||
277 | |||
278 | |||
279 | /** pcmcia_get_window | 200 | /** pcmcia_get_window |
280 | */ | 201 | */ |
281 | int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle, | 202 | int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle, |