aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/ibmtr_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-24 11:23:51 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:04:11 -0400
commit90abdc3b973229bae98dd96649d9f7106cc177a4 (patch)
tree5c1a7a131b65560dd73b5103118d8c7631bd76a4 /drivers/net/pcmcia/ibmtr_cs.c
parent9a017a910346afd88ec2e065989903bf211a7d37 (diff)
pcmcia: do not use io_req_t when calling pcmcia_request_io()
Instead of io_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[0,1] for up to two ioport ranges. After a call to pcmcia_request_io(), the ports found there are reserved, after calling pcmcia_request_configuration(), they may be used. 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: Michael Buesch <mb@bu3sch.de> Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia/ibmtr_cs.c')
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index e99abaa92be5..3fd859570db3 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -151,9 +151,8 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link)
151 link->priv = info; 151 link->priv = info;
152 info->ti = netdev_priv(dev); 152 info->ti = netdev_priv(dev);
153 153
154 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 154 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
155 link->io.NumPorts1 = 4; 155 link->resource[0]->end = 4;
156 link->io.IOAddrLines = 16;
157 link->conf.Attributes = CONF_ENABLE_IRQ; 156 link->conf.Attributes = CONF_ENABLE_IRQ;
158 link->conf.IntType = INT_MEMORY_AND_IO; 157 link->conf.IntType = INT_MEMORY_AND_IO;
159 link->conf.Present = PRESENT_OPTION; 158 link->conf.Present = PRESENT_OPTION;
@@ -218,16 +217,17 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
218 dev_dbg(&link->dev, "ibmtr_config\n"); 217 dev_dbg(&link->dev, "ibmtr_config\n");
219 218
220 link->conf.ConfigIndex = 0x61; 219 link->conf.ConfigIndex = 0x61;
220 link->io_lines = 16;
221 221
222 /* Determine if this is PRIMARY or ALTERNATE. */ 222 /* Determine if this is PRIMARY or ALTERNATE. */
223 223
224 /* Try PRIMARY card at 0xA20-0xA23 */ 224 /* Try PRIMARY card at 0xA20-0xA23 */
225 link->io.BasePort1 = 0xA20; 225 link->resource[0]->start = 0xA20;
226 i = pcmcia_request_io(link, &link->io); 226 i = pcmcia_request_io(link);
227 if (i != 0) { 227 if (i != 0) {
228 /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */ 228 /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */
229 link->io.BasePort1 = 0xA24; 229 link->resource[0]->start = 0xA24;
230 ret = pcmcia_request_io(link, &link->io); 230 ret = pcmcia_request_io(link);
231 if (ret) 231 if (ret)
232 goto failed; 232 goto failed;
233 } 233 }