aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
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/bluetooth
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/bluetooth')
-rw-r--r--drivers/bluetooth/bt3c_cs.c2
-rw-r--r--drivers/bluetooth/btuart_cs.c2
-rw-r--r--drivers/bluetooth/dtl1_cs.c1
3 files changed, 0 insertions, 5 deletions
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;