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/net/wireless/spectrum_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/net/wireless/spectrum_cs.c')
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index bcc7038130f6..cf2d1486b01d 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -647,21 +647,6 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
647 | cisparse_t parse; | 647 | cisparse_t parse; |
648 | void __iomem *mem; | 648 | void __iomem *mem; |
649 | 649 | ||
650 | /* | ||
651 | * This reads the card's CONFIG tuple to find its | ||
652 | * configuration registers. | ||
653 | */ | ||
654 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
655 | tuple.Attributes = 0; | ||
656 | tuple.TupleData = buf; | ||
657 | tuple.TupleDataMax = sizeof(buf); | ||
658 | tuple.TupleOffset = 0; | ||
659 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
660 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
661 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
662 | link->conf.ConfigBase = parse.config.base; | ||
663 | link->conf.Present = parse.config.rmask[0]; | ||
664 | |||
665 | /* Look up the current Vcc */ | 650 | /* Look up the current Vcc */ |
666 | CS_CHECK(GetConfigurationInfo, | 651 | CS_CHECK(GetConfigurationInfo, |
667 | pcmcia_get_configuration_info(link, &conf)); | 652 | pcmcia_get_configuration_info(link, &conf)); |
@@ -681,6 +666,10 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
681 | * implementation-defined details. | 666 | * implementation-defined details. |
682 | */ | 667 | */ |
683 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 668 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
669 | tuple.Attributes = 0; | ||
670 | tuple.TupleData = buf; | ||
671 | tuple.TupleDataMax = sizeof(buf); | ||
672 | tuple.TupleOffset = 0; | ||
684 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 673 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
685 | while (1) { | 674 | while (1) { |
686 | cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); | 675 | cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); |