summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pcmcia_resource.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-03 11:23:42 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-23 02:29:46 +0200
commit943f70f1b5182c5220641ccb7bb905005162e227 (patch)
treef3eaf1d507fc6740f0fcaecc549749a5219440cc /drivers/pcmcia/pcmcia_resource.c
parentffb8da20271bcfb343e299e5f630dab9ccfb6214 (diff)
downloadlinux-943f70f1b5182c5220641ccb7bb905005162e227.tar.gz
linux-943f70f1b5182c5220641ccb7bb905005162e227.tar.bz2
linux-943f70f1b5182c5220641ccb7bb905005162e227.zip
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>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r--drivers/pcmcia/pcmcia_resource.c12
1 files changed, 6 insertions, 6 deletions
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,
c = p_dev->function_config;
if (!(c->state & CONFIG_LOCKED))
- return CS_CONFIGURATION_LOCKED;
+ return -EACCES;
addr = (c->ConfigBase + reg->Offset) >> 1;
@@ -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) {
@@ -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)
@@ -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;
@@ -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))
@@ -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;