aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-02 08:59:13 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-22 19:21:29 -0400
commit498ac1899b62626bf6879a251d75c22ec564c559 (patch)
treed17c6c02ac97db98ac343a7ca1190147047385b2 /drivers/isdn/hisax
parent84e2d34004dcd0c90d1af43a143511b334f11a4d (diff)
pcmcia: pcmcia_config_loop() ConfigIndex unification
Almost all drivers set p_dev->conf.ConfigIndex to cfg->index in the pcmcia_config_loop() callback function. Therefore, factor it out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c1
-rw-r--r--drivers/isdn/hisax/elsa_cs.c2
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c1
-rw-r--r--drivers/isdn/hisax/teles_cs.c2
4 files changed, 0 insertions, 6 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 8142d9fc8147..76164d6a3c89 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -181,7 +181,6 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev,
181 if (cf->io.nwin <= 0) 181 if (cf->io.nwin <= 0)
182 return -ENODEV; 182 return -ENODEV;
183 183
184 p_dev->conf.ConfigIndex = cf->index;
185 p_dev->io.BasePort1 = cf->io.win[0].base; 184 p_dev->io.BasePort1 = cf->io.win[0].base;
186 p_dev->io.NumPorts1 = cf->io.win[0].len; 185 p_dev->io.NumPorts1 = cf->io.win[0].len;
187 p_dev->io.NumPorts2 = 0; 186 p_dev->io.NumPorts2 = 0;
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 449800898dcf..c9899e51a262 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -212,13 +212,11 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev,
212 212
213 if ((cf->io.nwin > 0) && cf->io.win[0].base) { 213 if ((cf->io.nwin > 0) && cf->io.win[0].base) {
214 printk(KERN_INFO "(elsa_cs: looks like the 96 model)\n"); 214 printk(KERN_INFO "(elsa_cs: looks like the 96 model)\n");
215 p_dev->conf.ConfigIndex = cf->index;
216 p_dev->io.BasePort1 = cf->io.win[0].base; 215 p_dev->io.BasePort1 = cf->io.win[0].base;
217 if (!pcmcia_request_io(p_dev, &p_dev->io)) 216 if (!pcmcia_request_io(p_dev, &p_dev->io))
218 return 0; 217 return 0;
219 } else { 218 } else {
220 printk(KERN_INFO "(elsa_cs: looks like the 97 model)\n"); 219 printk(KERN_INFO "(elsa_cs: looks like the 97 model)\n");
221 p_dev->conf.ConfigIndex = cf->index;
222 for (j = 0x2f0; j > 0x100; j -= 0x10) { 220 for (j = 0x2f0; j > 0x100; j -= 0x10) {
223 p_dev->io.BasePort1 = j; 221 p_dev->io.BasePort1 = j;
224 if (!pcmcia_request_io(p_dev, &p_dev->io)) 222 if (!pcmcia_request_io(p_dev, &p_dev->io))
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 0f80b5667ea1..2c611f91cfba 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -233,7 +233,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
233 cfg_mem->dflt = *cfg; 233 cfg_mem->dflt = *cfg;
234 if (cfg->index == 0) 234 if (cfg->index == 0)
235 return -ENODEV; 235 return -ENODEV;
236 p_dev->conf.ConfigIndex = cfg->index;
237 236
238 /* Does this card need audio output? */ 237 /* Does this card need audio output? */
239 if (cfg->flags & CISTPL_CFTABLE_AUDIO) { 238 if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 2b063a2916f4..ecb75ae8a399 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -202,13 +202,11 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev,
202 202
203 if ((cf->io.nwin > 0) && cf->io.win[0].base) { 203 if ((cf->io.nwin > 0) && cf->io.win[0].base) {
204 printk(KERN_INFO "(teles_cs: looks like the 96 model)\n"); 204 printk(KERN_INFO "(teles_cs: looks like the 96 model)\n");
205 p_dev->conf.ConfigIndex = cf->index;
206 p_dev->io.BasePort1 = cf->io.win[0].base; 205 p_dev->io.BasePort1 = cf->io.win[0].base;
207 if (!pcmcia_request_io(p_dev, &p_dev->io)) 206 if (!pcmcia_request_io(p_dev, &p_dev->io))
208 return 0; 207 return 0;
209 } else { 208 } else {
210 printk(KERN_INFO "(teles_cs: looks like the 97 model)\n"); 209 printk(KERN_INFO "(teles_cs: looks like the 97 model)\n");
211 p_dev->conf.ConfigIndex = cf->index;
212 for (j = 0x2f0; j > 0x100; j -= 0x10) { 210 for (j = 0x2f0; j > 0x100; j -= 0x10) {
213 p_dev->io.BasePort1 = j; 211 p_dev->io.BasePort1 = j;
214 if (!pcmcia_request_io(p_dev, &p_dev->io)) 212 if (!pcmcia_request_io(p_dev, &p_dev->io))