aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pcmcia_resource.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-06-20 07:24:31 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2008-06-24 09:33:44 -0400
commit4aeba0134f1e54cfd881e118b039ab6ed8b99126 (patch)
tree6e289b39fe5d0592334ceb5a3e45d05864bb5e9e /drivers/pcmcia/pcmcia_resource.c
parent6351a71cfae2839cf6e63329d3d85eb46a4bc2c7 (diff)
pcmcia: (re)move {pcmcia,pccard}_get_status
Except for one debug message in a driver marked BROKEN, pcmcia_get_status is only used by the ioctl. Therefore, move it to pcmcia_ioctl.c and unexport it. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r--drivers/pcmcia/pcmcia_resource.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index cb6b5da3f29a..4884a18cf9e6 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -309,74 +309,6 @@ int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle,
309EXPORT_SYMBOL(pcmcia_get_window); 309EXPORT_SYMBOL(pcmcia_get_window);
310 310
311 311
312/** pccard_get_status
313 *
314 * Get the current socket state bits. We don't support the latched
315 * SocketState yet: I haven't seen any point for it.
316 */
317
318int pccard_get_status(struct pcmcia_socket *s, struct pcmcia_device *p_dev,
319 cs_status_t *status)
320{
321 config_t *c;
322 int val;
323
324 s->ops->get_status(s, &val);
325 status->CardState = status->SocketState = 0;
326 status->CardState |= (val & SS_DETECT) ? CS_EVENT_CARD_DETECT : 0;
327 status->CardState |= (val & SS_CARDBUS) ? CS_EVENT_CB_DETECT : 0;
328 status->CardState |= (val & SS_3VCARD) ? CS_EVENT_3VCARD : 0;
329 status->CardState |= (val & SS_XVCARD) ? CS_EVENT_XVCARD : 0;
330 if (s->state & SOCKET_SUSPEND)
331 status->CardState |= CS_EVENT_PM_SUSPEND;
332 if (!(s->state & SOCKET_PRESENT))
333 return CS_NO_CARD;
334
335 c = (p_dev) ? p_dev->function_config : NULL;
336
337 if ((c != NULL) && (c->state & CONFIG_LOCKED) &&
338 (c->IntType & (INT_MEMORY_AND_IO | INT_ZOOMED_VIDEO))) {
339 u_char reg;
340 if (c->CardValues & PRESENT_PIN_REPLACE) {
341 pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, &reg);
342 status->CardState |=
343 (reg & PRR_WP_STATUS) ? CS_EVENT_WRITE_PROTECT : 0;
344 status->CardState |=
345 (reg & PRR_READY_STATUS) ? CS_EVENT_READY_CHANGE : 0;
346 status->CardState |=
347 (reg & PRR_BVD2_STATUS) ? CS_EVENT_BATTERY_LOW : 0;
348 status->CardState |=
349 (reg & PRR_BVD1_STATUS) ? CS_EVENT_BATTERY_DEAD : 0;
350 } else {
351 /* No PRR? Then assume we're always ready */
352 status->CardState |= CS_EVENT_READY_CHANGE;
353 }
354 if (c->CardValues & PRESENT_EXT_STATUS) {
355 pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, &reg);
356 status->CardState |=
357 (reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0;
358 }
359 return CS_SUCCESS;
360 }
361 status->CardState |=
362 (val & SS_WRPROT) ? CS_EVENT_WRITE_PROTECT : 0;
363 status->CardState |=
364 (val & SS_BATDEAD) ? CS_EVENT_BATTERY_DEAD : 0;
365 status->CardState |=
366 (val & SS_BATWARN) ? CS_EVENT_BATTERY_LOW : 0;
367 status->CardState |=
368 (val & SS_READY) ? CS_EVENT_READY_CHANGE : 0;
369 return CS_SUCCESS;
370} /* pccard_get_status */
371
372int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status)
373{
374 return pccard_get_status(p_dev->socket, p_dev, status);
375}
376EXPORT_SYMBOL(pcmcia_get_status);
377
378
379
380/** pcmcia_get_mem_page 312/** pcmcia_get_mem_page
381 * 313 *
382 * Change the card address of an already open memory window. 314 * Change the card address of an already open memory window.