diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-02 00:09:29 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 17:26:33 +0200 |
commit | e2d4096365e06b9a3799afbadc28b4519c0b3526 (patch) | |
tree | 90ec691d71f9c0309048714e359b8ba351b533f7 /drivers/scsi/pcmcia/aha152x_stub.c | |
parent | [PATCH] pcmcia: remove unused p_dev->state flags (diff) | |
download | linux-e2d4096365e06b9a3799afbadc28b4519c0b3526.tar.xz 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/aha152x_stub.c')
-rw-r--r-- | drivers/scsi/pcmcia/aha152x_stub.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 7caa700cf189..ee449b29fc82 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c @@ -122,7 +122,6 @@ static int aha152x_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 aha152x_config_cs(link); } /* aha152x_attach */ @@ -132,8 +131,7 @@ static void aha152x_detach(struct pcmcia_device *link) { DEBUG(0, "aha152x_detach(0x%p)\n", link); - if (link->state & DEV_CONFIG) - aha152x_release_cs(link); + aha152x_release_cs(link); /* Unlink device structure, free bits */ kfree(link->priv); @@ -165,9 +163,6 @@ static int aha152x_config_cs(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) { @@ -216,7 +211,6 @@ static int aha152x_config_cs(struct pcmcia_device *link) link->dev_node = &info->node; info->host = host; - link->state &= ~DEV_CONFIG_PENDING; return 0; cs_failed: |