diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 09:58:54 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:03:59 -0400 |
commit | 9a017a910346afd88ec2e065989903bf211a7d37 (patch) | |
tree | b407945c6e762f252bb81ae0fd64c745bba2ad11 /drivers/ata | |
parent | 2ce4905e4da9f512b38f56a53ece9da2072dd164 (diff) |
pcmcia: do not use io_req_t after call to pcmcia_request_io()
After pcmcia_request_io(), do not make use of the values stored in
io_req_t, but instead use those found in struct pcmcia_device->resource[].
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
Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_pcmcia.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 3dcb2b1b60e9..1fcd0659b3f2 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -210,13 +210,13 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, | |||
210 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; | 210 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; |
211 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 211 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
212 | return -ENODEV; | 212 | return -ENODEV; |
213 | stk->ctl_base = pdev->io.BasePort2; | 213 | stk->ctl_base = pdev->resource[1]->start; |
214 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { | 214 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { |
215 | pdev->io.NumPorts1 = io->win[0].len; | 215 | pdev->io.NumPorts1 = io->win[0].len; |
216 | pdev->io.NumPorts2 = 0; | 216 | pdev->io.NumPorts2 = 0; |
217 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 217 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
218 | return -ENODEV; | 218 | return -ENODEV; |
219 | stk->ctl_base = pdev->io.BasePort1 + 0x0e; | 219 | stk->ctl_base = pdev->resource[0]->start + 0x0e; |
220 | } else | 220 | } else |
221 | return -ENODEV; | 221 | return -ENODEV; |
222 | /* If we've got this far, we're done */ | 222 | /* If we've got this far, we're done */ |
@@ -270,7 +270,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
270 | if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk)) | 270 | if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk)) |
271 | goto failed; /* No suitable config found */ | 271 | goto failed; /* No suitable config found */ |
272 | } | 272 | } |
273 | io_base = pdev->io.BasePort1; | 273 | io_base = pdev->resource[0]->start; |
274 | ctl_base = stk->ctl_base; | 274 | ctl_base = stk->ctl_base; |
275 | if (!pdev->irq) | 275 | if (!pdev->irq) |
276 | goto failed; | 276 | goto failed; |
@@ -293,7 +293,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
293 | 293 | ||
294 | /* FIXME: Could be more ports at base + 0x10 but we only deal with | 294 | /* FIXME: Could be more ports at base + 0x10 but we only deal with |
295 | one right now */ | 295 | one right now */ |
296 | if (pdev->io.NumPorts1 >= 0x20) | 296 | if (resource_size(pdev->resource[0]) >= 0x20) |
297 | n_ports = 2; | 297 | n_ports = 2; |
298 | 298 | ||
299 | if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620) | 299 | if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620) |