summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/fdomain_stub.c
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 /drivers/scsi/pcmcia/fdomain_stub.c
parentf6fbe01ac976f3ec618cd5fb71ad9ce2cfa7ab2b (diff)
downloadblackbird-op-linux-e2d4096365e06b9a3799afbadc28b4519c0b3526.tar.gz
blackbird-op-linux-e2d4096365e06b9a3799afbadc28b4519c0b3526.zip
[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 'drivers/scsi/pcmcia/fdomain_stub.c')
-rw-r--r--drivers/scsi/pcmcia/fdomain_stub.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
index 80afd3e879cc..85f7ffac19a0 100644
--- a/drivers/scsi/pcmcia/fdomain_stub.c
+++ b/drivers/scsi/pcmcia/fdomain_stub.c
@@ -105,7 +105,6 @@ static int fdomain_probe(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
- link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
return fdomain_config(link);
} /* fdomain_attach */
@@ -115,8 +114,7 @@ static void fdomain_detach(struct pcmcia_device *link)
{
DEBUG(0, "fdomain_detach(0x%p)\n", link);
- if (link->state & DEV_CONFIG)
- fdomain_release(link);
+ fdomain_release(link);
kfree(link->priv);
} /* fdomain_detach */
@@ -147,9 +145,6 @@ static int fdomain_config(struct pcmcia_device *link)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
link->conf.ConfigBase = parse.config.base;
- /* Configure card */
- link->state |= DEV_CONFIG;
-
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
while (1) {
@@ -188,7 +183,6 @@ static int fdomain_config(struct pcmcia_device *link)
link->dev_node = &info->node;
info->host = host;
- link->state &= ~DEV_CONFIG_PENDING;
return 0;
cs_failed:
@@ -214,8 +208,7 @@ static void fdomain_release(struct pcmcia_device *link)
static int fdomain_resume(struct pcmcia_device *link)
{
- if (link->state & DEV_CONFIG)
- fdomain_16x0_bus_reset(NULL);
+ fdomain_16x0_bus_reset(NULL);
return 0;
}
OpenPOWER on IntegriCloud