aboutsummaryrefslogtreecommitdiff
path: root/sound/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-02 00:09:29 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:26:33 +0200
commite2d4096365e06b9a3799afbadc28b4519c0b3526 (patch)
tree90ec691d71f9c0309048714e359b8ba351b533f7 /sound/pcmcia
parentf6fbe01ac976f3ec618cd5fb71ad9ce2cfa7ab2b (diff)
downloadlinux-linaro-stable-e2d4096365e06b9a3799afbadc28b4519c0b3526.tar.gz
[PATCH] pcmcia: use bitfield instead of p_state and state
Instead of the two status values struct pcmcia_device->p_state and state, use descriptive bitfields. Most value-checking in drivers was invalid, as the core now only calls the ->remove() (a.k.a. detach) function in case the attachement _and_ configuration was successful. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'sound/pcmcia')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c4
-rw-r--r--sound/pcmcia/vx/vxpocket.c5
2 files changed, 0 insertions, 9 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 923b1d0c2f1b..a1333fa236ac 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -243,9 +243,6 @@ static int pdacf_config(struct pcmcia_device *link)
link->conf.ConfigIndex = 0x5;
kfree(parse);
- /* Configure card */
- link->state |= DEV_CONFIG;
-
CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
@@ -254,7 +251,6 @@ static int pdacf_config(struct pcmcia_device *link)
goto failed;
link->dev_node = &pdacf->node;
- link->state &= ~DEV_CONFIG_PENDING;
return 0;
cs_failed:
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 4004b35e8af5..f5f4a577a441 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -249,9 +249,6 @@ static int vxpocket_config(struct pcmcia_device *link)
strcpy(chip->card->driver, vxp440_hw.name);
}
- /* Configure card */
- link->state |= DEV_CONFIG;
-
CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
@@ -263,7 +260,6 @@ static int vxpocket_config(struct pcmcia_device *link)
goto failed;
link->dev_node = &vxp->node;
- link->state &= ~DEV_CONFIG_PENDING;
kfree(parse);
return 9;
@@ -348,7 +344,6 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
card_alloc |= 1 << i;
vxp->p_dev = p_dev;
- vxp->p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
return vxpocket_config(p_dev);
}