Skip to content

Commit

Permalink
pcmcia: deprecate CS_CONFIGURATION_LOCKED
Browse files Browse the repository at this point in the history
This error code meant that trying to change the configuration after the
initialization phase is forbidden.

Signed-off-by: Dominik Brodowski <[email protected]>
  • Loading branch information
Dominik Brodowski committed Aug 23, 2008
1 parent ffb8da2 commit 943f70f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static const lookup_t error_table[] = {
{ -ENODEV, "No card present" },
{ -EINVAL, "Bad parameter" },
{ CS_BAD_ARGS, "Bad arguments" },
{ CS_CONFIGURATION_LOCKED, "Configuration locked" },
{ -EACCES, "Configuration locked" },
{ CS_IN_USE, "Resource in use" },
{ CS_NO_MORE_ITEMS, "No more items" },
{ CS_OUT_OF_RESOURCE, "Out of resource" },
Expand Down
12 changes: 6 additions & 6 deletions drivers/pcmcia/pcmcia_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev,
c = p_dev->function_config;

if (!(c->state & CONFIG_LOCKED))
return CS_CONFIGURATION_LOCKED;
return -EACCES;

addr = (c->ConfigBase + reg->Offset) >> 1;

Expand Down Expand Up @@ -278,7 +278,7 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
if (!(s->state & SOCKET_PRESENT))
return -ENODEV;
if (!(c->state & CONFIG_LOCKED))
return CS_CONFIGURATION_LOCKED;
return -EACCES;

if (mod->Attributes & CONF_IRQ_CHANGE_VALID) {
if (mod->Attributes & CONF_ENABLE_IRQ) {
Expand Down Expand Up @@ -419,7 +419,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
p_dev->_irq = 0;

if (c->state & CONFIG_LOCKED)
return CS_CONFIGURATION_LOCKED;
return -EACCES;
if (c->irq.Attributes != req->Attributes)
return CS_BAD_ATTRIBUTE;
if (s->irq.AssignedIRQ != req->AssignedIRQ)
Expand Down Expand Up @@ -489,7 +489,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
}
c = p_dev->function_config;
if (c->state & CONFIG_LOCKED)
return CS_CONFIGURATION_LOCKED;
return -EACCES;

/* Do power control. We don't allow changes in Vcc. */
s->socket.Vpp = req->Vpp;
Expand Down Expand Up @@ -608,7 +608,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
return -EINVAL;
c = p_dev->function_config;
if (c->state & CONFIG_LOCKED)
return CS_CONFIGURATION_LOCKED;
return -EACCES;
if (c->state & CONFIG_IO_REQ)
return CS_IN_USE;
if (req->Attributes1 & (IO_SHARED | IO_FORCE_ALIAS_ACCESS))
Expand Down Expand Up @@ -665,7 +665,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
return -ENODEV;
c = p_dev->function_config;
if (c->state & CONFIG_LOCKED)
return CS_CONFIGURATION_LOCKED;
return -EACCES;
if (c->state & CONFIG_IRQ_REQ)
return CS_IN_USE;

Expand Down
2 changes: 1 addition & 1 deletion include/pcmcia/cs.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ typedef struct error_info_t {
#define CS_WRITE_PROTECTED -EPERM
#define CS_BAD_ARG_LENGTH -ENODEV
#define CS_BAD_ARGS 0x1c
#define CS_CONFIGURATION_LOCKED 0x1d
#define CS_CONFIGURATION_LOCKED -EACCES
#define CS_IN_USE 0x1e
#define CS_NO_MORE_ITEMS 0x1f
#define CS_OUT_OF_RESOURCE -ENOMEM
Expand Down

0 comments on commit 943f70f

Please sign in to comment.