diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-25 21:49:27 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-12-04 20:12:02 -0500 |
commit | af2b3b503ad1b071b66e1531caae252b4b95c847 (patch) | |
tree | 600785af3af4a79978f688fa35e19ab900db264b /drivers/bluetooth/bluecard_cs.c | |
parent | a9606fd39083478bef313c0e3b77bc065e39e36e (diff) |
[PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.
Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/bluetooth/bluecard_cs.c')
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index cbc07250b898..acfb6a430dcc 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c @@ -892,43 +892,10 @@ static void bluecard_detach(struct pcmcia_device *link) } -static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse) -{ - int i; - - i = pcmcia_get_first_tuple(handle, tuple); - if (i != CS_SUCCESS) - return CS_NO_MORE_ITEMS; - - i = pcmcia_get_tuple_data(handle, tuple); - if (i != CS_SUCCESS) - return i; - - return pcmcia_parse_tuple(handle, tuple, parse); -} - static int bluecard_config(struct pcmcia_device *link) { bluecard_info_t *info = link->priv; - tuple_t tuple; - u_short buf[256]; - cisparse_t parse; - int i, n, last_ret, last_fn; - - tuple.TupleData = (cisdata_t *)buf; - tuple.TupleOffset = 0; - tuple.TupleDataMax = 255; - tuple.Attributes = 0; - - /* Get configuration register information */ - tuple.DesiredTuple = CISTPL_CONFIG; - last_ret = first_tuple(link, &tuple, &parse); - if (last_ret != CS_SUCCESS) { - last_fn = ParseTuple; - goto cs_failed; - } - link->conf.ConfigBase = parse.config.base; - link->conf.Present = parse.config.rmask[0]; + int i, n; link->conf.ConfigIndex = 0x20; link->io.NumPorts1 = 64; @@ -966,9 +933,6 @@ static int bluecard_config(struct pcmcia_device *link) return 0; -cs_failed: - cs_error(link, last_fn, last_ret); - failed: bluecard_release(link); return -ENODEV; |