diff options
Diffstat (limited to 'drivers')
29 files changed, 6 insertions, 46 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 8cccd1b81ee2..4b8bd2021a9c 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -181,7 +181,6 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, | |||
181 | 181 | ||
182 | if ((cfg->io.nwin > 0) || (stk->dflt.io.nwin > 0)) { | 182 | if ((cfg->io.nwin > 0) || (stk->dflt.io.nwin > 0)) { |
183 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &stk->dflt.io; | 183 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &stk->dflt.io; |
184 | pdev->conf.ConfigIndex = cfg->index; | ||
185 | pdev->io.BasePort1 = io->win[0].base; | 184 | pdev->io.BasePort1 = io->win[0].base; |
186 | pdev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; | 185 | pdev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; |
187 | if (!(io->flags & CISTPL_IO_16BIT)) | 186 | if (!(io->flags & CISTPL_IO_16BIT)) |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 6ec366f1cf74..3436be152485 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -688,7 +688,6 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, | |||
688 | p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; | 688 | p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; |
689 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && | 689 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && |
690 | (cf->io.win[0].base != 0)) { | 690 | (cf->io.win[0].base != 0)) { |
691 | p_dev->conf.ConfigIndex = cf->index; | ||
692 | p_dev->io.BasePort1 = cf->io.win[0].base; | 691 | p_dev->io.BasePort1 = cf->io.win[0].base; |
693 | p_dev->io.IOAddrLines = (try == 0) ? 16 : | 692 | p_dev->io.IOAddrLines = (try == 0) ? 16 : |
694 | cf->io.flags & CISTPL_IO_LINES_MASK; | 693 | cf->io.flags & CISTPL_IO_LINES_MASK; |
@@ -706,7 +705,6 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev, | |||
706 | int j; | 705 | int j; |
707 | 706 | ||
708 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { | 707 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { |
709 | p_dev->conf.ConfigIndex = cf->index; | ||
710 | for (j = 0; j < 5; j++) { | 708 | for (j = 0; j < 5; j++) { |
711 | p_dev->io.BasePort1 = base[j]; | 709 | p_dev->io.BasePort1 = base[j]; |
712 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; | 710 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 39cca285152d..5e31ea2f2d6f 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -617,7 +617,6 @@ static int btuart_check_config(struct pcmcia_device *p_dev, | |||
617 | p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; | 617 | p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; |
618 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && | 618 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && |
619 | (cf->io.win[0].base != 0)) { | 619 | (cf->io.win[0].base != 0)) { |
620 | p_dev->conf.ConfigIndex = cf->index; | ||
621 | p_dev->io.BasePort1 = cf->io.win[0].base; | 620 | p_dev->io.BasePort1 = cf->io.win[0].base; |
622 | p_dev->io.IOAddrLines = (try == 0) ? 16 : | 621 | p_dev->io.IOAddrLines = (try == 0) ? 16 : |
623 | cf->io.flags & CISTPL_IO_LINES_MASK; | 622 | cf->io.flags & CISTPL_IO_LINES_MASK; |
@@ -635,7 +634,6 @@ static int btuart_check_config_notpicky(struct pcmcia_device *p_dev, | |||
635 | int j; | 634 | int j; |
636 | 635 | ||
637 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { | 636 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { |
638 | p_dev->conf.ConfigIndex = cf->index; | ||
639 | for (j = 0; j < 5; j++) { | 637 | for (j = 0; j < 5; j++) { |
640 | p_dev->io.BasePort1 = base[j]; | 638 | p_dev->io.BasePort1 = base[j]; |
641 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; | 639 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index e30a6332c6c6..1846e2aa9d4a 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -595,7 +595,6 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev, | |||
595 | void *priv_data) | 595 | void *priv_data) |
596 | { | 596 | { |
597 | if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) { | 597 | if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) { |
598 | p_dev->conf.ConfigIndex = cf->index; | ||
599 | p_dev->io.BasePort1 = cf->io.win[0].base; | 598 | p_dev->io.BasePort1 = cf->io.win[0].base; |
600 | p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */ | 599 | p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */ |
601 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 600 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 47adec480bd1..7eafd2f4dbb9 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -1763,8 +1763,6 @@ static int cm4000_config_check(struct pcmcia_device *p_dev, | |||
1763 | cistpl_cftable_entry_t *cfg, | 1763 | cistpl_cftable_entry_t *cfg, |
1764 | void *priv_data) | 1764 | void *priv_data) |
1765 | { | 1765 | { |
1766 | p_dev->conf.ConfigIndex = cfg->index; | ||
1767 | |||
1768 | if (!cfg->io.nwin) | 1766 | if (!cfg->io.nwin) |
1769 | return -ENODEV; | 1767 | return -ENODEV; |
1770 | 1768 | ||
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index e0f5d8c9b266..71ca8c474c89 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -531,8 +531,6 @@ static int cm4040_config_check(struct pcmcia_device *p_dev, | |||
531 | void *priv_data) | 531 | void *priv_data) |
532 | { | 532 | { |
533 | int rc; | 533 | int rc; |
534 | p_dev->conf.ConfigIndex = cfg->index; | ||
535 | |||
536 | if (!cfg->io.nwin) | 534 | if (!cfg->io.nwin) |
537 | return -ENODEV; | 535 | return -ENODEV; |
538 | 536 | ||
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index 7a1ead117d11..3569c68dc942 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
@@ -161,7 +161,6 @@ static int avmcs_configcheck(struct pcmcia_device *p_dev, | |||
161 | if (cf->io.nwin <= 0) | 161 | if (cf->io.nwin <= 0) |
162 | return -ENODEV; | 162 | return -ENODEV; |
163 | 163 | ||
164 | p_dev->conf.ConfigIndex = cf->index; | ||
165 | p_dev->io.BasePort1 = cf->io.win[0].base; | 164 | p_dev->io.BasePort1 = cf->io.win[0].base; |
166 | p_dev->io.NumPorts1 = cf->io.win[0].len; | 165 | p_dev->io.NumPorts1 = cf->io.win[0].len; |
167 | p_dev->io.NumPorts2 = 0; | 166 | p_dev->io.NumPorts2 = 0; |
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)) |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 7a9eeca6adc2..a60608722495 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -523,8 +523,6 @@ static int pcnet_confcheck(struct pcmcia_device *p_dev, | |||
523 | if (cfg->index == 0 || cfg->io.nwin == 0) | 523 | if (cfg->index == 0 || cfg->io.nwin == 0) |
524 | return -EINVAL; | 524 | return -EINVAL; |
525 | 525 | ||
526 | p_dev->conf.ConfigIndex = cfg->index; | ||
527 | |||
528 | /* For multifunction cards, by convention, we configure the | 526 | /* For multifunction cards, by convention, we configure the |
529 | network function with window 0, and serial with window 1 */ | 527 | network function with window 0, and serial with window 1 */ |
530 | if (io->nwin > 1) { | 528 | if (io->nwin > 1) { |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index c012e3400736..1e595038a492 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -464,7 +464,6 @@ static int mhz_mfc_config_check(struct pcmcia_device *p_dev, | |||
464 | void *priv_data) | 464 | void *priv_data) |
465 | { | 465 | { |
466 | int k; | 466 | int k; |
467 | p_dev->conf.ConfigIndex = cf->index; | ||
468 | p_dev->io.BasePort2 = cf->io.win[0].base; | 467 | p_dev->io.BasePort2 = cf->io.win[0].base; |
469 | for (k = 0; k < 0x400; k += 0x10) { | 468 | for (k = 0; k < 0x400; k += 0x10) { |
470 | if (k & 0x80) | 469 | if (k & 0x80) |
@@ -654,7 +653,6 @@ static int smc_configcheck(struct pcmcia_device *p_dev, | |||
654 | cistpl_cftable_entry_t *cf, | 653 | cistpl_cftable_entry_t *cf, |
655 | void *priv_data) | 654 | void *priv_data) |
656 | { | 655 | { |
657 | p_dev->conf.ConfigIndex = cf->index; | ||
658 | p_dev->io.BasePort1 = cf->io.win[0].base; | 656 | p_dev->io.BasePort1 = cf->io.win[0].base; |
659 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 657 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
660 | return pcmcia_request_io(p_dev, &p_dev->io); | 658 | return pcmcia_request_io(p_dev, &p_dev->io); |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index b57f022952b4..b0de704f229c 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -724,7 +724,6 @@ xirc2ps_config_modem(struct pcmcia_device *p_dev, | |||
724 | 724 | ||
725 | if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) { | 725 | if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) { |
726 | for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { | 726 | for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { |
727 | p_dev->conf.ConfigIndex = cf->index ; | ||
728 | p_dev->io.BasePort2 = cf->io.win[0].base; | 727 | p_dev->io.BasePort2 = cf->io.win[0].base; |
729 | p_dev->io.BasePort1 = ioaddr; | 728 | p_dev->io.BasePort1 = ioaddr; |
730 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | 729 | if (!pcmcia_request_io(p_dev, &p_dev->io)) |
@@ -742,7 +741,6 @@ xirc2ps_config_check(struct pcmcia_device *p_dev, | |||
742 | int *pass = priv_data; | 741 | int *pass = priv_data; |
743 | 742 | ||
744 | if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) { | 743 | if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) { |
745 | p_dev->conf.ConfigIndex = cf->index ; | ||
746 | p_dev->io.BasePort2 = cf->io.win[0].base; | 744 | p_dev->io.BasePort2 = cf->io.win[0].base; |
747 | p_dev->io.BasePort1 = p_dev->io.BasePort2 | 745 | p_dev->io.BasePort1 = p_dev->io.BasePort2 |
748 | + (*pass ? (cf->index & 0x20 ? -24:8) | 746 | + (*pass ? (cf->index & 0x20 ? -24:8) |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 4fbe811bebfc..d7216730f18e 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -223,8 +223,6 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, | |||
223 | if (cfg->index == 0) | 223 | if (cfg->index == 0) |
224 | return -ENODEV; | 224 | return -ENODEV; |
225 | 225 | ||
226 | p_dev->conf.ConfigIndex = cfg->index; | ||
227 | |||
228 | /* Does this card need audio output? */ | 226 | /* Does this card need audio output? */ |
229 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | 227 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { |
230 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; | 228 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 263c36f7ee22..12efd44d64a1 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -234,8 +234,6 @@ static int atmel_config_check(struct pcmcia_device *p_dev, | |||
234 | *dflt = *cfg; | 234 | *dflt = *cfg; |
235 | if (cfg->index == 0) | 235 | if (cfg->index == 0) |
236 | return -ENODEV; | 236 | return -ENODEV; |
237 | p_dev->conf.ConfigIndex = cfg->index; | ||
238 | |||
239 | /* Does this card need audio output? */ | 237 | /* Does this card need audio output? */ |
240 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | 238 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { |
241 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; | 239 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 3d914dde5de0..2abaa90b799d 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -552,7 +552,6 @@ static int prism2_config_check(struct pcmcia_device *p_dev, | |||
552 | if (cfg->index == 0) | 552 | if (cfg->index == 0) |
553 | return -ENODEV; | 553 | return -ENODEV; |
554 | 554 | ||
555 | p_dev->conf.ConfigIndex = cfg->index; | ||
556 | PDEBUG(DEBUG_EXTRA, "Checking CFTABLE_ENTRY 0x%02X " | 555 | PDEBUG(DEBUG_EXTRA, "Checking CFTABLE_ENTRY 0x%02X " |
557 | "(default 0x%02X)\n", cfg->index, cfg_mem->dflt.index); | 556 | "(default 0x%02X)\n", cfg->index, cfg_mem->dflt.index); |
558 | 557 | ||
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index 473370c9e0d6..67a172dfb2db 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -179,7 +179,6 @@ static int orinoco_cs_config_check(struct pcmcia_device *p_dev, | |||
179 | cfg_mem->dflt = *cfg; | 179 | cfg_mem->dflt = *cfg; |
180 | if (cfg->index == 0) | 180 | if (cfg->index == 0) |
181 | goto next_entry; | 181 | goto next_entry; |
182 | p_dev->conf.ConfigIndex = cfg->index; | ||
183 | 182 | ||
184 | /* Use power settings for Vcc and Vpp if present */ | 183 | /* Use power settings for Vcc and Vpp if present */ |
185 | /* Note that the CIS values need to be rescaled */ | 184 | /* Note that the CIS values need to be rescaled */ |
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index 8e1951cfc152..7536aa91dad7 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -648,7 +648,6 @@ static int spectrum_cs_config_check(struct pcmcia_device *p_dev, | |||
648 | cfg_mem->dflt = *cfg; | 648 | cfg_mem->dflt = *cfg; |
649 | if (cfg->index == 0) | 649 | if (cfg->index == 0) |
650 | goto next_entry; | 650 | goto next_entry; |
651 | p_dev->conf.ConfigIndex = cfg->index; | ||
652 | 651 | ||
653 | /* Use power settings for Vcc and Vpp if present */ | 652 | /* Use power settings for Vcc and Vpp if present */ |
654 | /* Note that the CIS values need to be rescaled */ | 653 | /* Note that the CIS values need to be rescaled */ |
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index 636231739f4b..814c5252d703 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c | |||
@@ -156,7 +156,6 @@ static int parport_config_check(struct pcmcia_device *p_dev, | |||
156 | cistpl_cftable_entry_t *dflt = priv_data; | 156 | cistpl_cftable_entry_t *dflt = priv_data; |
157 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 157 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
158 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 158 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
159 | p_dev->conf.ConfigIndex = cfg->index; | ||
160 | if (epp_mode) | 159 | if (epp_mode) |
161 | p_dev->conf.ConfigIndex |= FORCE_EPP_MODE; | 160 | p_dev->conf.ConfigIndex |= FORCE_EPP_MODE; |
162 | p_dev->io.BasePort1 = io->win[0].base; | 161 | p_dev->io.BasePort1 = io->win[0].base; |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 9f054bc847f2..ba34ac8876ff 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -953,14 +953,18 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, | |||
953 | 953 | ||
954 | ret = pcmcia_get_first_tuple(p_dev, tuple); | 954 | ret = pcmcia_get_first_tuple(p_dev, tuple); |
955 | while (!ret) { | 955 | while (!ret) { |
956 | cistpl_cftable_entry_t *cfg = &cfg_mem->parse.cftable_entry; | ||
957 | |||
956 | if (pcmcia_get_tuple_data(p_dev, tuple)) | 958 | if (pcmcia_get_tuple_data(p_dev, tuple)) |
957 | goto next_entry; | 959 | goto next_entry; |
958 | 960 | ||
959 | if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse)) | 961 | if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse)) |
960 | goto next_entry; | 962 | goto next_entry; |
961 | 963 | ||
962 | ret = conf_check(p_dev, &cfg_mem->parse.cftable_entry, | 964 | /* default values */ |
963 | priv_data); | 965 | p_dev->conf.ConfigIndex = cfg->index; |
966 | |||
967 | ret = conf_check(p_dev, cfg, priv_data); | ||
964 | if (!ret) | 968 | if (!ret) |
965 | break; | 969 | break; |
966 | 970 | ||
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index bbcc20f2d9d0..5e4d8e42ba0b 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
@@ -152,7 +152,6 @@ static int aha152x_config_check(struct pcmcia_device *p_dev, | |||
152 | p_dev->io.BasePort1 = cfg->io.win[1].base; | 152 | p_dev->io.BasePort1 = cfg->io.win[1].base; |
153 | if ((cfg->io.nwin > 0) && | 153 | if ((cfg->io.nwin > 0) && |
154 | (p_dev->io.BasePort1 < 0xffff)) { | 154 | (p_dev->io.BasePort1 < 0xffff)) { |
155 | p_dev->conf.ConfigIndex = cfg->index; | ||
156 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | 155 | if (!pcmcia_request_io(p_dev, &p_dev->io)) |
157 | return 0; | 156 | return 0; |
158 | } | 157 | } |
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index fefef7d81f14..e3d6937c9200 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
@@ -127,7 +127,6 @@ static int fdomain_config_check(struct pcmcia_device *p_dev, | |||
127 | cistpl_cftable_entry_t *cfg, | 127 | cistpl_cftable_entry_t *cfg, |
128 | void *priv_data) | 128 | void *priv_data) |
129 | { | 129 | { |
130 | p_dev->conf.ConfigIndex = cfg->index; | ||
131 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 130 | p_dev->io.BasePort1 = cfg->io.win[0].base; |
132 | return pcmcia_request_io(p_dev, &p_dev->io); | 131 | return pcmcia_request_io(p_dev, &p_dev->io); |
133 | } | 132 | } |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index a29a6f29c977..aee24b745dc9 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1626,8 +1626,6 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, | |||
1626 | if (cfg->index == 0) | 1626 | if (cfg->index == 0) |
1627 | return -ENODEV; | 1627 | return -ENODEV; |
1628 | 1628 | ||
1629 | p_dev->conf.ConfigIndex = cfg->index; | ||
1630 | |||
1631 | /* Does this card need audio output? */ | 1629 | /* Does this card need audio output? */ |
1632 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | 1630 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { |
1633 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; | 1631 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; |
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index aa9b9e0968b6..a361275b20a3 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
@@ -199,7 +199,6 @@ static int qlogic_config_check(struct pcmcia_device *p_dev, | |||
199 | cistpl_cftable_entry_t *cfg, | 199 | cistpl_cftable_entry_t *cfg, |
200 | void *priv_data) | 200 | void *priv_data) |
201 | { | 201 | { |
202 | p_dev->conf.ConfigIndex = cfg->index; | ||
203 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 202 | p_dev->io.BasePort1 = cfg->io.win[0].base; |
204 | p_dev->io.NumPorts1 = cfg->io.win[0].len; | 203 | p_dev->io.NumPorts1 = cfg->io.win[0].len; |
205 | 204 | ||
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 15369d9e3121..23a5219051a9 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -704,7 +704,6 @@ static int SYM53C500_config_check(struct pcmcia_device *p_dev, | |||
704 | cistpl_cftable_entry_t *cfg, | 704 | cistpl_cftable_entry_t *cfg, |
705 | void *priv_data) | 705 | void *priv_data) |
706 | { | 706 | { |
707 | p_dev->conf.ConfigIndex = cfg->index; | ||
708 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 707 | p_dev->io.BasePort1 = cfg->io.win[0].base; |
709 | p_dev->io.NumPorts1 = cfg->io.win[0].len; | 708 | p_dev->io.NumPorts1 = cfg->io.win[0].len; |
710 | 709 | ||
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index ac60cd288418..693738160010 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -454,7 +454,6 @@ static int simple_config_check(struct pcmcia_device *p_dev, | |||
454 | 454 | ||
455 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == size_table[(*try >> 1)]) | 455 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == size_table[(*try >> 1)]) |
456 | && (cf->io.win[0].base != 0)) { | 456 | && (cf->io.win[0].base != 0)) { |
457 | p_dev->conf.ConfigIndex = cf->index; | ||
458 | p_dev->io.BasePort1 = cf->io.win[0].base; | 457 | p_dev->io.BasePort1 = cf->io.win[0].base; |
459 | p_dev->io.IOAddrLines = ((*try & 0x1) == 0) ? | 458 | p_dev->io.IOAddrLines = ((*try & 0x1) == 0) ? |
460 | 16 : cf->io.flags & CISTPL_IO_LINES_MASK; | 459 | 16 : cf->io.flags & CISTPL_IO_LINES_MASK; |
@@ -472,7 +471,6 @@ static int simple_config_check_notpicky(struct pcmcia_device *p_dev, | |||
472 | int j; | 471 | int j; |
473 | 472 | ||
474 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { | 473 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { |
475 | p_dev->conf.ConfigIndex = cf->index; | ||
476 | for (j = 0; j < 5; j++) { | 474 | for (j = 0; j < 5; j++) { |
477 | p_dev->io.BasePort1 = base[j]; | 475 | p_dev->io.BasePort1 = base[j]; |
478 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; | 476 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; |
@@ -555,7 +553,6 @@ static int multi_config_check(struct pcmcia_device *p_dev, | |||
555 | /* The quad port cards have bad CIS's, so just look for a | 553 | /* The quad port cards have bad CIS's, so just look for a |
556 | window larger than 8 ports and assume it will be right */ | 554 | window larger than 8 ports and assume it will be right */ |
557 | if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) { | 555 | if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) { |
558 | p_dev->conf.ConfigIndex = cf->index; | ||
559 | p_dev->io.BasePort1 = cf->io.win[0].base; | 556 | p_dev->io.BasePort1 = cf->io.win[0].base; |
560 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 557 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
561 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { | 558 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { |
@@ -573,7 +570,6 @@ static int multi_config_check_notpicky(struct pcmcia_device *p_dev, | |||
573 | int *base2 = priv_data; | 570 | int *base2 = priv_data; |
574 | 571 | ||
575 | if (cf->io.nwin == 2) { | 572 | if (cf->io.nwin == 2) { |
576 | p_dev->conf.ConfigIndex = cf->index; | ||
577 | p_dev->io.BasePort1 = cf->io.win[0].base; | 573 | p_dev->io.BasePort1 = cf->io.win[0].base; |
578 | p_dev->io.BasePort2 = cf->io.win[1].base; | 574 | p_dev->io.BasePort2 = cf->io.win[1].base; |
579 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 575 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c index 89c5e40ce3a0..ba2c7a2125a0 100644 --- a/drivers/telephony/ixj_pcmcia.c +++ b/drivers/telephony/ixj_pcmcia.c | |||
@@ -132,7 +132,6 @@ static int ixj_config_check(struct pcmcia_device *p_dev, | |||
132 | 132 | ||
133 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 133 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
134 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 134 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
135 | p_dev->conf.ConfigIndex = cfg->index; | ||
136 | p_dev->io.BasePort1 = io->win[0].base; | 135 | p_dev->io.BasePort1 = io->win[0].base; |
137 | p_dev->io.NumPorts1 = io->win[0].len; | 136 | p_dev->io.NumPorts1 = io->win[0].len; |
138 | if (io->nwin == 2) { | 137 | if (io->nwin == 2) { |
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 9773601bf0bb..5b55c72c710b 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -172,8 +172,6 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, | |||
172 | if (cfg->index == 0) | 172 | if (cfg->index == 0) |
173 | return -ENODEV; | 173 | return -ENODEV; |
174 | 174 | ||
175 | p_dev->conf.ConfigIndex = cfg->index; | ||
176 | |||
177 | /* Use power settings for Vcc and Vpp if present */ | 175 | /* Use power settings for Vcc and Vpp if present */ |
178 | /* Note that the CIS values need to be rescaled */ | 176 | /* Note that the CIS values need to be rescaled */ |
179 | if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) { | 177 | if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) { |