diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-02 08:59:13 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 19:21:29 -0400 |
commit | 498ac1899b62626bf6879a251d75c22ec564c559 (patch) | |
tree | d17c6c02ac97db98ac343a7ca1190147047385b2 /drivers/net/pcmcia | |
parent | 84e2d34004dcd0c90d1af43a143511b334f11a4d (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/net/pcmcia')
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 2 |
3 files changed, 0 insertions, 6 deletions
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) |