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/ide | |
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/ide')
-rw-r--r-- | drivers/ide/ide-cs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index 27dbab84142c..6be0e5f108b5 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
@@ -239,13 +239,13 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, | |||
239 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; | 239 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; |
240 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 240 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
241 | return -ENODEV; | 241 | return -ENODEV; |
242 | stk->ctl_base = pdev->io.BasePort2; | 242 | stk->ctl_base = pdev->resource[1]->start; |
243 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { | 243 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { |
244 | pdev->io.NumPorts1 = io->win[0].len; | 244 | pdev->io.NumPorts1 = io->win[0].len; |
245 | pdev->io.NumPorts2 = 0; | 245 | pdev->io.NumPorts2 = 0; |
246 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 246 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
247 | return -ENODEV; | 247 | return -ENODEV; |
248 | stk->ctl_base = pdev->io.BasePort1 + 0x0e; | 248 | stk->ctl_base = pdev->resource[0]->start + 0x0e; |
249 | } else | 249 | } else |
250 | return -ENODEV; | 250 | return -ENODEV; |
251 | /* If we've got this far, we're done */ | 251 | /* If we've got this far, we're done */ |
@@ -279,7 +279,7 @@ static int ide_config(struct pcmcia_device *link) | |||
279 | if (pcmcia_loop_config(link, pcmcia_check_one_config, stk)) | 279 | if (pcmcia_loop_config(link, pcmcia_check_one_config, stk)) |
280 | goto failed; /* No suitable config found */ | 280 | goto failed; /* No suitable config found */ |
281 | } | 281 | } |
282 | io_base = link->io.BasePort1; | 282 | io_base = link->resource[0]->start; |
283 | ctl_base = stk->ctl_base; | 283 | ctl_base = stk->ctl_base; |
284 | 284 | ||
285 | if (!link->irq) | 285 | if (!link->irq) |
@@ -296,7 +296,7 @@ static int ide_config(struct pcmcia_device *link) | |||
296 | outb(0x81, ctl_base+1); | 296 | outb(0x81, ctl_base+1); |
297 | 297 | ||
298 | host = idecs_register(io_base, ctl_base, link->irq, link); | 298 | host = idecs_register(io_base, ctl_base, link->irq, link); |
299 | if (host == NULL && link->io.NumPorts1 == 0x20) { | 299 | if (host == NULL && resource_size(link->resource[0]) == 0x20) { |
300 | outb(0x02, ctl_base + 0x10); | 300 | outb(0x02, ctl_base + 0x10); |
301 | host = idecs_register(io_base + 0x10, ctl_base + 0x10, | 301 | host = idecs_register(io_base + 0x10, ctl_base + 0x10, |
302 | link->irq, link); | 302 | link->irq, link); |