diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 11:23:51 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:04:11 -0400 |
commit | 90abdc3b973229bae98dd96649d9f7106cc177a4 (patch) | |
tree | 5c1a7a131b65560dd73b5103118d8c7631bd76a4 /drivers/net/pcmcia/com20020_cs.c | |
parent | 9a017a910346afd88ec2e065989903bf211a7d37 (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/com20020_cs.c')
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 3b53818e3eef..3c400cfa82ae 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -158,9 +158,8 @@ static int com20020_probe(struct pcmcia_device *p_dev) | |||
158 | /* fill in our module parameters as defaults */ | 158 | /* fill in our module parameters as defaults */ |
159 | dev->dev_addr[0] = node; | 159 | dev->dev_addr[0] = node; |
160 | 160 | ||
161 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 161 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
162 | p_dev->io.NumPorts1 = 16; | 162 | p_dev->resource[0]->end = 16; |
163 | p_dev->io.IOAddrLines = 16; | ||
164 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 163 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
165 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 164 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
166 | 165 | ||
@@ -245,20 +244,24 @@ static int com20020_config(struct pcmcia_device *link) | |||
245 | 244 | ||
246 | dev_dbg(&link->dev, "com20020_config\n"); | 245 | dev_dbg(&link->dev, "com20020_config\n"); |
247 | 246 | ||
248 | dev_dbg(&link->dev, "baseport1 is %Xh\n", link->io.BasePort1); | 247 | dev_dbg(&link->dev, "baseport1 is %Xh\n", |
248 | (unsigned int) link->resource[0]->start); | ||
249 | |||
249 | i = -ENODEV; | 250 | i = -ENODEV; |
250 | if (!link->io.BasePort1) | 251 | link->io_lines = 16; |
252 | |||
253 | if (!link->resource[0]->start) | ||
251 | { | 254 | { |
252 | for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) | 255 | for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) |
253 | { | 256 | { |
254 | link->io.BasePort1 = ioaddr; | 257 | link->resource[0]->start = ioaddr; |
255 | i = pcmcia_request_io(link, &link->io); | 258 | i = pcmcia_request_io(link); |
256 | if (i == 0) | 259 | if (i == 0) |
257 | break; | 260 | break; |
258 | } | 261 | } |
259 | } | 262 | } |
260 | else | 263 | else |
261 | i = pcmcia_request_io(link, &link->io); | 264 | i = pcmcia_request_io(link); |
262 | 265 | ||
263 | if (i != 0) | 266 | if (i != 0) |
264 | { | 267 | { |