aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-10 14:40:40 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:01:34 -0500
commit1ae9c7d8198ae973da3b927e28d63f294ffa11e3 (patch)
tree153c355f17f456a6db932453433f4e1d3809eb4e /drivers/pcmcia
parent6e3d4f25a561d15863ff4868a03780f59ba5ae8c (diff)
[PATCH] pcmcia: remove unused field Present from config_t
config_t.Present is set to the same value as CardValues, which isn't modified anywhere. Therefore, we can use only one of these two objects. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cs_internal.h1
-rw-r--r--drivers/pcmcia/pcmcia_resource.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 7b37eba35bf1..2b267def9621 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -45,7 +45,6 @@ typedef struct config_t {
45 u_int IntType; 45 u_int IntType;
46 u_int ConfigBase; 46 u_int ConfigBase;
47 u_char Status, Pin, Copy, Option, ExtStatus; 47 u_char Status, Pin, Copy, Option, ExtStatus;
48 u_int Present;
49 u_int CardValues; 48 u_int CardValues;
50 io_req_t io; 49 io_req_t io;
51 struct { 50 struct {
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 89022ad5b520..f58814519ebc 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -338,7 +338,7 @@ int pccard_get_status(struct pcmcia_socket *s, unsigned int function,
338 if ((c != NULL) && (c->state & CONFIG_LOCKED) && 338 if ((c != NULL) && (c->state & CONFIG_LOCKED) &&
339 (c->IntType & (INT_MEMORY_AND_IO | INT_ZOOMED_VIDEO))) { 339 (c->IntType & (INT_MEMORY_AND_IO | INT_ZOOMED_VIDEO))) {
340 u_char reg; 340 u_char reg;
341 if (c->Present & PRESENT_PIN_REPLACE) { 341 if (c->CardValues & PRESENT_PIN_REPLACE) {
342 pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, &reg); 342 pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, &reg);
343 status->CardState |= 343 status->CardState |=
344 (reg & PRR_WP_STATUS) ? CS_EVENT_WRITE_PROTECT : 0; 344 (reg & PRR_WP_STATUS) ? CS_EVENT_WRITE_PROTECT : 0;
@@ -352,7 +352,7 @@ int pccard_get_status(struct pcmcia_socket *s, unsigned int function,
352 /* No PRR? Then assume we're always ready */ 352 /* No PRR? Then assume we're always ready */
353 status->CardState |= CS_EVENT_READY_CHANGE; 353 status->CardState |= CS_EVENT_READY_CHANGE;
354 } 354 }
355 if (c->Present & PRESENT_EXT_STATUS) { 355 if (c->CardValues & PRESENT_EXT_STATUS) {
356 pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, &reg); 356 pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, &reg);
357 status->CardState |= 357 status->CardState |=
358 (reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0; 358 (reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0;
@@ -643,7 +643,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
643 643
644 /* Set up CIS configuration registers */ 644 /* Set up CIS configuration registers */
645 base = c->ConfigBase = req->ConfigBase; 645 base = c->ConfigBase = req->ConfigBase;
646 c->Present = c->CardValues = req->Present; 646 c->CardValues = req->Present;
647 if (req->Present & PRESENT_COPY) { 647 if (req->Present & PRESENT_COPY) {
648 c->Copy = req->Copy; 648 c->Copy = req->Copy;
649 pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy); 649 pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy);