aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-29 13:27:09 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:23 -0400
commit1ac71e5a35eebee60cdcf15b3980bd94498f037b (patch)
tree22fa9342ccccce6a774af029ce51a526e55f8180 /drivers/scsi/pcmcia
parent7feabb6412ea23edd298c0fa90e5aa6733eb4a42 (diff)
pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device
pcmcia_enable_device() now replaces pcmcia_request_configuration(). Instead of config_req_t, all necessary flags are either passed as a parameter to pcmcia_enable_device(), or (in rare circumstances) set in struct pcmcia_device -> flags. With the last remaining user of include/pcmcia/cs.h gone, remove all references. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r--drivers/scsi/pcmcia/aha152x_stub.c5
-rw-r--r--drivers/scsi/pcmcia/fdomain_stub.c5
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c13
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c7
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c5
5 files changed, 14 insertions, 21 deletions
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index c3682492af16..e1f748517135 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -49,7 +49,6 @@
49#include <scsi/scsi_host.h> 49#include <scsi/scsi_host.h>
50#include "aha152x.h" 50#include "aha152x.h"
51 51
52#include <pcmcia/cs.h>
53#include <pcmcia/cistpl.h> 52#include <pcmcia/cistpl.h>
54#include <pcmcia/ds.h> 53#include <pcmcia/ds.h>
55 54
@@ -102,7 +101,7 @@ static int aha152x_probe(struct pcmcia_device *link)
102 101
103 link->resource[0]->end = 0x20; 102 link->resource[0]->end = 0x20;
104 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 103 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
105 link->conf.Attributes = CONF_ENABLE_IRQ; 104 link->config_flags |= CONF_ENABLE_IRQ;
106 link->config_regs = PRESENT_OPTION; 105 link->config_regs = PRESENT_OPTION;
107 106
108 return aha152x_config_cs(link); 107 return aha152x_config_cs(link);
@@ -159,7 +158,7 @@ static int aha152x_config_cs(struct pcmcia_device *link)
159 if (!link->irq) 158 if (!link->irq)
160 goto failed; 159 goto failed;
161 160
162 ret = pcmcia_request_configuration(link, &link->conf); 161 ret = pcmcia_enable_device(link);
163 if (ret) 162 if (ret)
164 goto failed; 163 goto failed;
165 164
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
index bb909e1b7c68..ae263b17bfa5 100644
--- a/drivers/scsi/pcmcia/fdomain_stub.c
+++ b/drivers/scsi/pcmcia/fdomain_stub.c
@@ -46,7 +46,6 @@
46#include <scsi/scsi_host.h> 46#include <scsi/scsi_host.h>
47#include "fdomain.h" 47#include "fdomain.h"
48 48
49#include <pcmcia/cs.h>
50#include <pcmcia/cistpl.h> 49#include <pcmcia/cistpl.h>
51#include <pcmcia/ds.h> 50#include <pcmcia/ds.h>
52 51
@@ -85,7 +84,7 @@ static int fdomain_probe(struct pcmcia_device *link)
85 link->priv = info; 84 link->priv = info;
86 link->resource[0]->end = 0x10; 85 link->resource[0]->end = 0x10;
87 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 86 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
88 link->conf.Attributes = CONF_ENABLE_IRQ; 87 link->config_flags |= CONF_ENABLE_IRQ;
89 link->config_regs = PRESENT_OPTION; 88 link->config_regs = PRESENT_OPTION;
90 89
91 return fdomain_config(link); 90 return fdomain_config(link);
@@ -131,7 +130,7 @@ static int fdomain_config(struct pcmcia_device *link)
131 130
132 if (!link->irq) 131 if (!link->irq)
133 goto failed; 132 goto failed;
134 ret = pcmcia_request_configuration(link, &link->conf); 133 ret = pcmcia_enable_device(link);
135 if (ret) 134 if (ret)
136 goto failed; 135 goto failed;
137 136
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index a5648e9c4f6e..d0546c03f57c 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -47,7 +47,6 @@
47#include <scsi/scsi.h> 47#include <scsi/scsi.h>
48#include <scsi/scsi_ioctl.h> 48#include <scsi/scsi_ioctl.h>
49 49
50#include <pcmcia/cs.h>
51#include <pcmcia/cistpl.h> 50#include <pcmcia/cistpl.h>
52#include <pcmcia/cisreg.h> 51#include <pcmcia/cisreg.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
@@ -1562,7 +1561,7 @@ static int nsp_cs_probe(struct pcmcia_device *link)
1562 link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO; 1561 link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO;
1563 1562
1564 /* General socket configuration */ 1563 /* General socket configuration */
1565 link->conf.Attributes = CONF_ENABLE_IRQ; 1564 link->config_flags |= CONF_ENABLE_IRQ;
1566 1565
1567 ret = nsp_cs_config(link); 1566 ret = nsp_cs_config(link);
1568 1567
@@ -1608,7 +1607,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
1608 1607
1609 /* Does this card need audio output? */ 1608 /* Does this card need audio output? */
1610 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 1609 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
1611 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 1610 p_dev->config_flags |= CONF_ENABLE_SPKR;
1612 1611
1613 /* Use power settings for Vcc and Vpp if present */ 1612 /* Use power settings for Vcc and Vpp if present */
1614 /* Note that the CIS values need to be rescaled */ 1613 /* Note that the CIS values need to be rescaled */
@@ -1629,7 +1628,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
1629 } 1628 }
1630 1629
1631 /* Do we need to allocate an interrupt? */ 1630 /* Do we need to allocate an interrupt? */
1632 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 1631 p_dev->config_flags |= CONF_ENABLE_IRQ;
1633 1632
1634 /* IO window settings */ 1633 /* IO window settings */
1635 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 1634 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -1700,7 +1699,7 @@ static int nsp_cs_config(struct pcmcia_device *link)
1700 if (pcmcia_request_irq(link, nspintr)) 1699 if (pcmcia_request_irq(link, nspintr))
1701 goto cs_failed; 1700 goto cs_failed;
1702 1701
1703 ret = pcmcia_request_configuration(link, &link->conf); 1702 ret = pcmcia_enable_device(link);
1704 if (ret) 1703 if (ret)
1705 goto cs_failed; 1704 goto cs_failed;
1706 1705
@@ -1749,9 +1748,7 @@ static int nsp_cs_config(struct pcmcia_device *link)
1749 if (link->vpp) { 1748 if (link->vpp) {
1750 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 1749 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10);
1751 } 1750 }
1752 if (link->conf.Attributes & CONF_ENABLE_IRQ) { 1751 printk(", irq %d", link->irq);
1753 printk(", irq %d", link->irq);
1754 }
1755 if (link->resource[0]) 1752 if (link->resource[0])
1756 printk(", io %pR", link->resource[0]); 1753 printk(", io %pR", link->resource[0]);
1757 if (link->resource[1]) 1754 if (link->resource[1])
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 5e2cbe091408..7d3f49c431fd 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -48,7 +48,6 @@
48#include <scsi/scsi_host.h> 48#include <scsi/scsi_host.h>
49#include "../qlogicfas408.h" 49#include "../qlogicfas408.h"
50 50
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
54#include <pcmcia/ciscode.h> 53#include <pcmcia/ciscode.h>
@@ -158,7 +157,7 @@ static int qlogic_probe(struct pcmcia_device *link)
158 link->priv = info; 157 link->priv = info;
159 link->resource[0]->end = 16; 158 link->resource[0]->end = 16;
160 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 159 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
161 link->conf.Attributes = CONF_ENABLE_IRQ; 160 link->config_flags |= CONF_ENABLE_IRQ;
162 link->config_regs = PRESENT_OPTION; 161 link->config_regs = PRESENT_OPTION;
163 162
164 return qlogic_config(link); 163 return qlogic_config(link);
@@ -208,7 +207,7 @@ static int qlogic_config(struct pcmcia_device * link)
208 if (!link->irq) 207 if (!link->irq)
209 goto failed; 208 goto failed;
210 209
211 ret = pcmcia_request_configuration(link, &link->conf); 210 ret = pcmcia_enable_device(link);
212 if (ret) 211 if (ret)
213 goto failed; 212 goto failed;
214 213
@@ -263,7 +262,7 @@ static int qlogic_resume(struct pcmcia_device *link)
263{ 262{
264 scsi_info_t *info = link->priv; 263 scsi_info_t *info = link->priv;
265 264
266 pcmcia_request_configuration(link, &link->conf); 265 pcmcia_enable_device(link);
267 if ((info->manf_id == MANFID_MACNICA) || 266 if ((info->manf_id == MANFID_MACNICA) ||
268 (info->manf_id == MANFID_PIONEER) || 267 (info->manf_id == MANFID_PIONEER) ||
269 (info->manf_id == 0x0098)) { 268 (info->manf_id == 0x0098)) {
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 9aaf974d4d1c..600630eb7034 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -71,7 +71,6 @@
71#include <scsi/scsi.h> 71#include <scsi/scsi.h>
72#include <scsi/scsi_host.h> 72#include <scsi/scsi_host.h>
73 73
74#include <pcmcia/cs.h>
75#include <pcmcia/cistpl.h> 74#include <pcmcia/cistpl.h>
76#include <pcmcia/ds.h> 75#include <pcmcia/ds.h>
77#include <pcmcia/ciscode.h> 76#include <pcmcia/ciscode.h>
@@ -721,7 +720,7 @@ SYM53C500_config(struct pcmcia_device *link)
721 if (!link->irq) 720 if (!link->irq)
722 goto failed; 721 goto failed;
723 722
724 ret = pcmcia_request_configuration(link, &link->conf); 723 ret = pcmcia_enable_device(link);
725 if (ret) 724 if (ret)
726 goto failed; 725 goto failed;
727 726
@@ -861,7 +860,7 @@ SYM53C500_probe(struct pcmcia_device *link)
861 link->priv = info; 860 link->priv = info;
862 link->resource[0]->end = 16; 861 link->resource[0]->end = 16;
863 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 862 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
864 link->conf.Attributes = CONF_ENABLE_IRQ; 863 link->config_flags |= CONF_ENABLE_IRQ;
865 864
866 return SYM53C500_config(link); 865 return SYM53C500_config(link);
867} /* SYM53C500_attach */ 866} /* SYM53C500_attach */