diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 05:23:42 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:46 -0400 |
commit | 943f70f1b5182c5220641ccb7bb905005162e227 (patch) | |
tree | f3eaf1d507fc6740f0fcaecc549749a5219440cc | |
parent | ffb8da20271bcfb343e299e5f630dab9ccfb6214 (diff) |
pcmcia: deprecate CS_CONFIGURATION_LOCKED
This error code meant that trying to change the configuration after the
initialization phase is forbidden.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | drivers/pcmcia/ds.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 12 | ||||
-rw-r--r-- | include/pcmcia/cs.h | 2 |
3 files changed, 8 insertions, 8 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 | ||
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index dc5c1eb8ec79..a517a5845af0 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -313,7 +313,7 @@ typedef struct error_info_t { | |||
313 | #define CS_WRITE_PROTECTED -EPERM | 313 | #define CS_WRITE_PROTECTED -EPERM |
314 | #define CS_BAD_ARG_LENGTH -ENODEV | 314 | #define CS_BAD_ARG_LENGTH -ENODEV |
315 | #define CS_BAD_ARGS 0x1c | 315 | #define CS_BAD_ARGS 0x1c |
316 | #define CS_CONFIGURATION_LOCKED 0x1d | 316 | #define CS_CONFIGURATION_LOCKED -EACCES |
317 | #define CS_IN_USE 0x1e | 317 | #define CS_IN_USE 0x1e |
318 | #define CS_NO_MORE_ITEMS 0x1f | 318 | #define CS_NO_MORE_ITEMS 0x1f |
319 | #define CS_OUT_OF_RESOURCE -ENOMEM | 319 | #define CS_OUT_OF_RESOURCE -ENOMEM |