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/netwave_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/netwave_cs.c')
-rw-r--r-- | drivers/net/wireless/netwave_cs.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 6714e0dfa8d6..644b4741ef74 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -735,10 +735,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
735 | static int netwave_pcmcia_config(struct pcmcia_device *link) { | 735 | static int netwave_pcmcia_config(struct pcmcia_device *link) { |
736 | struct net_device *dev = link->priv; | 736 | struct net_device *dev = link->priv; |
737 | netwave_private *priv = netdev_priv(dev); | 737 | netwave_private *priv = netdev_priv(dev); |
738 | tuple_t tuple; | ||
739 | cisparse_t parse; | ||
740 | int i, j, last_ret, last_fn; | 738 | int i, j, last_ret, last_fn; |
741 | u_char buf[64]; | ||
742 | win_req_t req; | 739 | win_req_t req; |
743 | memreq_t mem; | 740 | memreq_t mem; |
744 | u_char __iomem *ramBase = NULL; | 741 | u_char __iomem *ramBase = NULL; |
@@ -746,21 +743,6 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { | |||
746 | DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); | 743 | DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); |
747 | 744 | ||
748 | /* | 745 | /* |
749 | This reads the card's CONFIG tuple to find its configuration | ||
750 | registers. | ||
751 | */ | ||
752 | tuple.Attributes = 0; | ||
753 | tuple.TupleData = (cisdata_t *) buf; | ||
754 | tuple.TupleDataMax = 64; | ||
755 | tuple.TupleOffset = 0; | ||
756 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
757 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
758 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
759 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
760 | link->conf.ConfigBase = parse.config.base; | ||
761 | link->conf.Present = parse.config.rmask[0]; | ||
762 | |||
763 | /* | ||
764 | * Try allocating IO ports. This tries a few fixed addresses. | 746 | * Try allocating IO ports. This tries a few fixed addresses. |
765 | * If you want, you can also read the card's config table to | 747 | * If you want, you can also read the card's config table to |
766 | * pick addresses -- see the serial driver for an example. | 748 | * pick addresses -- see the serial driver for an example. |