aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c2
-rw-r--r--drivers/pcmcia/pcmcia_resource.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 6a37198df9f1..7f38eb06c81e 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -86,7 +86,7 @@ static const lookup_t error_table[] = {
86 { -ENODEV, "No card present" }, 86 { -ENODEV, "No card present" },
87 { -EINVAL, "Bad parameter" }, 87 { -EINVAL, "Bad parameter" },
88 { CS_BAD_ARGS, "Bad arguments" }, 88 { CS_BAD_ARGS, "Bad arguments" },
89 { CS_CONFIGURATION_LOCKED, "Configuration locked" }, 89 { -EACCES, "Configuration locked" },
90 { CS_IN_USE, "Resource in use" }, 90 { CS_IN_USE, "Resource in use" },
91 { CS_NO_MORE_ITEMS, "No more items" }, 91 { CS_NO_MORE_ITEMS, "No more items" },
92 { CS_OUT_OF_RESOURCE, "Out of resource" }, 92 { CS_OUT_OF_RESOURCE, "Out of resource" },
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 55a1238b1c57..0ac3ea92a1c5 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -175,7 +175,7 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev,
175 c = p_dev->function_config; 175 c = p_dev->function_config;
176 176
177 if (!(c->state & CONFIG_LOCKED)) 177 if (!(c->state & CONFIG_LOCKED))
178 return CS_CONFIGURATION_LOCKED; 178 return -EACCES;
179 179
180 addr = (c->ConfigBase + reg->Offset) >> 1; 180 addr = (c->ConfigBase + reg->Offset) >> 1;
181 181
@@ -278,7 +278,7 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
278 if (!(s->state & SOCKET_PRESENT)) 278 if (!(s->state & SOCKET_PRESENT))
279 return -ENODEV; 279 return -ENODEV;
280 if (!(c->state & CONFIG_LOCKED)) 280 if (!(c->state & CONFIG_LOCKED))
281 return CS_CONFIGURATION_LOCKED; 281 return -EACCES;
282 282
283 if (mod->Attributes & CONF_IRQ_CHANGE_VALID) { 283 if (mod->Attributes & CONF_IRQ_CHANGE_VALID) {
284 if (mod->Attributes & CONF_ENABLE_IRQ) { 284 if (mod->Attributes & CONF_ENABLE_IRQ) {
@@ -419,7 +419,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
419 p_dev->_irq = 0; 419 p_dev->_irq = 0;
420 420
421 if (c->state & CONFIG_LOCKED) 421 if (c->state & CONFIG_LOCKED)
422 return CS_CONFIGURATION_LOCKED; 422 return -EACCES;
423 if (c->irq.Attributes != req->Attributes) 423 if (c->irq.Attributes != req->Attributes)
424 return CS_BAD_ATTRIBUTE; 424 return CS_BAD_ATTRIBUTE;
425 if (s->irq.AssignedIRQ != req->AssignedIRQ) 425 if (s->irq.AssignedIRQ != req->AssignedIRQ)
@@ -489,7 +489,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
489 } 489 }
490 c = p_dev->function_config; 490 c = p_dev->function_config;
491 if (c->state & CONFIG_LOCKED) 491 if (c->state & CONFIG_LOCKED)
492 return CS_CONFIGURATION_LOCKED; 492 return -EACCES;
493 493
494 /* Do power control. We don't allow changes in Vcc. */ 494 /* Do power control. We don't allow changes in Vcc. */
495 s->socket.Vpp = req->Vpp; 495 s->socket.Vpp = req->Vpp;
@@ -608,7 +608,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
608 return -EINVAL; 608 return -EINVAL;
609 c = p_dev->function_config; 609 c = p_dev->function_config;
610 if (c->state & CONFIG_LOCKED) 610 if (c->state & CONFIG_LOCKED)
611 return CS_CONFIGURATION_LOCKED; 611 return -EACCES;
612 if (c->state & CONFIG_IO_REQ) 612 if (c->state & CONFIG_IO_REQ)
613 return CS_IN_USE; 613 return CS_IN_USE;
614 if (req->Attributes1 & (IO_SHARED | IO_FORCE_ALIAS_ACCESS)) 614 if (req->Attributes1 & (IO_SHARED | IO_FORCE_ALIAS_ACCESS))
@@ -665,7 +665,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
665 return -ENODEV; 665 return -ENODEV;
666 c = p_dev->function_config; 666 c = p_dev->function_config;
667 if (c->state & CONFIG_LOCKED) 667 if (c->state & CONFIG_LOCKED)
668 return CS_CONFIGURATION_LOCKED; 668 return -EACCES;
669 if (c->state & CONFIG_IRQ_REQ) 669 if (c->state & CONFIG_IRQ_REQ)
670 return CS_IN_USE; 670 return CS_IN_USE;
671 671