aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
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/serial
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/serial')
-rw-r--r--drivers/serial/serial_cs.c4
1 files changed, 0 insertions, 4 deletions
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;