aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-10-25 21:49:27 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2006-12-04 20:12:02 -0500
commitaf2b3b503ad1b071b66e1531caae252b4b95c847 (patch)
tree600785af3af4a79978f688fa35e19ab900db264b /drivers/isdn
parenta9606fd39083478bef313c0e3b77bc065e39e36e (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/isdn')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c22
-rw-r--r--drivers/isdn/hisax/avma1_cs.c22
-rw-r--r--drivers/isdn/hisax/elsa_cs.c17
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c10
-rw-r--r--drivers/isdn/hisax/teles_cs.c17
5 files changed, 0 insertions, 88 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index db3755b28f5..fd5d7364a48 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -194,28 +194,6 @@ static int avmcs_config(struct pcmcia_device *link)
dev = link->priv;
- /*
- This reads the card's CONFIG tuple to find its configuration
- registers.
- */
- do {
- tuple.DesiredTuple = CISTPL_CONFIG;
- i = pcmcia_get_first_tuple(link, &tuple);
- if (i != CS_SUCCESS) break;
- tuple.TupleData = buf;
- tuple.TupleDataMax = 64;
- tuple.TupleOffset = 0;
- i = pcmcia_get_tuple_data(link, &tuple);
- if (i != CS_SUCCESS) break;
- i = pcmcia_parse_tuple(link, &tuple, &parse);
- if (i != CS_SUCCESS) break;
- link->conf.ConfigBase = parse.config.base;
- } while (0);
- if (i != CS_SUCCESS) {
- cs_error(link, ParseTuple, i);
- return -ENODEV;
- }
-
do {
devname[0] = 0;
if (link->prod_id[1])
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 40c9b026729..876fec6c6be 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -216,28 +216,6 @@ static int avma1cs_config(struct pcmcia_device *link)
DEBUG(0, "avma1cs_config(0x%p)\n", link);
- /*
- This reads the card's CONFIG tuple to find its configuration
- registers.
- */
- do {
- tuple.DesiredTuple = CISTPL_CONFIG;
- i = pcmcia_get_first_tuple(link, &tuple);
- if (i != CS_SUCCESS) break;
- tuple.TupleData = buf;
- tuple.TupleDataMax = 64;
- tuple.TupleOffset = 0;
- i = pcmcia_get_tuple_data(link, &tuple);
- if (i != CS_SUCCESS) break;
- i = pcmcia_parse_tuple(link, &tuple, &parse);
- if (i != CS_SUCCESS) break;
- link->conf.ConfigBase = parse.config.base;
- } while (0);
- if (i != CS_SUCCESS) {
- cs_error(link, ParseTuple, i);
- return -ENODEV;
- }
-
do {
devname[0] = 0;
if (link->prod_id[1])
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index e18e75be8ed..4e180d210fa 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -242,23 +242,6 @@ static int elsa_cs_config(struct pcmcia_device *link)
DEBUG(0, "elsa_config(0x%p)\n", link);
dev = link->priv;
- /*
- This reads the card's CONFIG tuple to find its configuration
- registers.
- */
- tuple.DesiredTuple = CISTPL_CONFIG;
- tuple.TupleData = (cisdata_t *)buf;
- tuple.TupleDataMax = 255;
- tuple.TupleOffset = 0;
- tuple.Attributes = 0;
- i = first_tuple(link, &tuple, &parse);
- if (i != CS_SUCCESS) {
- last_fn = ParseTuple;
- goto cs_failed;
- }
- link->conf.ConfigBase = parse.config.base;
- link->conf.Present = parse.config.rmask[0];
-
tuple.TupleData = (cisdata_t *)buf;
tuple.TupleOffset = 0; tuple.TupleDataMax = 255;
tuple.Attributes = 0;
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index f9c14a2970b..46ed65334c5 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -233,20 +233,10 @@ static int sedlbauer_config(struct pcmcia_device *link)
DEBUG(0, "sedlbauer_config(0x%p)\n", link);
- /*
- This reads the card's CONFIG tuple to find its configuration
- registers.
- */
- tuple.DesiredTuple = CISTPL_CONFIG;
tuple.Attributes = 0;
tuple.TupleData = buf;
tuple.TupleDataMax = sizeof(buf);
tuple.TupleOffset = 0;
- CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
- CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
- CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
- link->conf.ConfigBase = parse.config.base;
- link->conf.Present = parse.config.rmask[0];
CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &conf));
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index afcc2aeadb3..6b754f18379 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -232,23 +232,6 @@ static int teles_cs_config(struct pcmcia_device *link)
DEBUG(0, "teles_config(0x%p)\n", link);
dev = link->priv;
- /*
- This reads the card's CONFIG tuple to find its configuration
- registers.
- */
- tuple.DesiredTuple = CISTPL_CONFIG;
- tuple.TupleData = (cisdata_t *)buf;
- tuple.TupleDataMax = 255;
- tuple.TupleOffset = 0;
- tuple.Attributes = 0;
- i = first_tuple(link, &tuple, &parse);
- if (i != CS_SUCCESS) {
- last_fn = ParseTuple;
- goto cs_failed;
- }
- link->conf.ConfigBase = parse.config.base;
- link->conf.Present = parse.config.rmask[0];
-
tuple.TupleData = (cisdata_t *)buf;
tuple.TupleOffset = 0; tuple.TupleDataMax = 255;
tuple.Attributes = 0;