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/telephony | |
parent | f6fbe01ac976f3ec618cd5fb71ad9ce2cfa7ab2b (diff) | |
download | linux-stable-e2d4096365e06b9a3799afbadc28b4519c0b3526.tar.gz linux-stable-e2d4096365e06b9a3799afbadc28b4519c0b3526.tar.bz2 linux-stable-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/telephony')
-rw-r--r-- | drivers/telephony/ixj_pcmcia.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c index 5c7611c2ac6c..dda0ca45d904 100644 --- a/drivers/telephony/ixj_pcmcia.c +++ b/drivers/telephony/ixj_pcmcia.c @@ -52,7 +52,6 @@ static int ixj_probe(struct pcmcia_device *p_dev) } memset(p_dev->priv, 0, sizeof(struct ixj_info_t)); - p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; return ixj_config(p_dev); } @@ -60,8 +59,7 @@ static void ixj_detach(struct pcmcia_device *link) { DEBUG(0, "ixj_detach(0x%p)\n", link); - if (link->state & DEV_CONFIG) - ixj_cs_release(link); + ixj_cs_release(link); kfree(link->priv); } @@ -155,7 +153,6 @@ static int ixj_config(struct pcmcia_device * link) CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); link->conf.ConfigBase = parse.config.base; link->conf.Present = parse.config.rmask[0]; - link->state |= DEV_CONFIG; tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; tuple.Attributes = 0; CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); @@ -194,7 +191,6 @@ static int ixj_config(struct pcmcia_device * link) info->node.major = PHONE_MAJOR; link->dev_node = &info->node; ixj_get_serial(link, j); - link->state &= ~DEV_CONFIG_PENDING; return 0; cs_failed: cs_error(link, last_fn, last_ret); |