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/scsi | |
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/scsi')
-rw-r--r-- | drivers/scsi/pcmcia/aha152x_stub.c | 2 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/fdomain_stub.c | 4 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 25 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/qlogic_stub.c | 18 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 16 |
5 files changed, 32 insertions, 33 deletions
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index b07b53ef3c00..3e040f503afa 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
@@ -167,7 +167,7 @@ static int aha152x_config_cs(struct pcmcia_device *link) | |||
167 | /* Set configuration options for the aha152x driver */ | 167 | /* Set configuration options for the aha152x driver */ |
168 | memset(&s, 0, sizeof(s)); | 168 | memset(&s, 0, sizeof(s)); |
169 | s.conf = "PCMCIA setup"; | 169 | s.conf = "PCMCIA setup"; |
170 | s.io_port = link->io.BasePort1; | 170 | s.io_port = link->resource[0]->start; |
171 | s.irq = link->irq; | 171 | s.irq = link->irq; |
172 | s.scsiid = host_id; | 172 | s.scsiid = host_id; |
173 | s.reconnect = reconnect; | 173 | s.reconnect = reconnect; |
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index ee0489762539..49a9a0a60c82 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
@@ -137,10 +137,10 @@ static int fdomain_config(struct pcmcia_device *link) | |||
137 | goto failed; | 137 | goto failed; |
138 | 138 | ||
139 | /* A bad hack... */ | 139 | /* A bad hack... */ |
140 | release_region(link->io.BasePort1, link->io.NumPorts1); | 140 | release_region(link->resource[0]->start, resource_size(link->resource[0])); |
141 | 141 | ||
142 | /* Set configuration options for the fdomain driver */ | 142 | /* Set configuration options for the fdomain driver */ |
143 | sprintf(str, "%d,%d", link->io.BasePort1, link->irq); | 143 | sprintf(str, "%d,%d", (unsigned int) link->resource[0]->start, link->irq); |
144 | fdomain_setup(str); | 144 | fdomain_setup(str); |
145 | 145 | ||
146 | host = __fdomain_16x0_detect(&fdomain_driver_template); | 146 | host = __fdomain_16x0_detect(&fdomain_driver_template); |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index d4142075be21..d929891809ab 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1719,17 +1719,19 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1719 | goto cs_failed; | 1719 | goto cs_failed; |
1720 | 1720 | ||
1721 | if (free_ports) { | 1721 | if (free_ports) { |
1722 | if (link->io.BasePort1) { | 1722 | if (link->resource[0]) { |
1723 | release_region(link->io.BasePort1, link->io.NumPorts1); | 1723 | release_region(link->resource[0]->start, |
1724 | resource_size(link->resource[0])); | ||
1724 | } | 1725 | } |
1725 | if (link->io.BasePort2) { | 1726 | if (link->resource[1]) { |
1726 | release_region(link->io.BasePort2, link->io.NumPorts2); | 1727 | release_region(link->resource[1]->start, |
1728 | resource_size(link->resource[1])); | ||
1727 | } | 1729 | } |
1728 | } | 1730 | } |
1729 | 1731 | ||
1730 | /* Set port and IRQ */ | 1732 | /* Set port and IRQ */ |
1731 | data->BaseAddress = link->io.BasePort1; | 1733 | data->BaseAddress = link->resource[0]->start; |
1732 | data->NumAddress = link->io.NumPorts1; | 1734 | data->NumAddress = resource_size(link->resource[0]); |
1733 | data->IrqNumber = link->irq; | 1735 | data->IrqNumber = link->irq; |
1734 | 1736 | ||
1735 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", | 1737 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", |
@@ -1764,13 +1766,10 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1764 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 1766 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { |
1765 | printk(", irq %d", link->irq); | 1767 | printk(", irq %d", link->irq); |
1766 | } | 1768 | } |
1767 | if (link->io.NumPorts1) { | 1769 | if (link->resource[0]) |
1768 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 1770 | printk(", io %pR", link->resource[0]); |
1769 | link->io.BasePort1+link->io.NumPorts1-1); | 1771 | if (link->resource[1]) |
1770 | } | 1772 | printk(" & %pR", link->resource[1]); |
1771 | if (link->io.NumPorts2) | ||
1772 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
1773 | link->io.BasePort2+link->io.NumPorts2-1); | ||
1774 | if (link->win) | 1773 | if (link->win) |
1775 | printk(", mem 0x%06lx-0x%06lx", cfg_mem->req.Base, | 1774 | printk(", mem 0x%06lx-0x%06lx", cfg_mem->req.Base, |
1776 | cfg_mem->req.Base+cfg_mem->req.Size-1); | 1775 | cfg_mem->req.Base+cfg_mem->req.Size-1); |
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index c1cf7f43313b..4e2b83f26232 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
@@ -215,18 +215,18 @@ static int qlogic_config(struct pcmcia_device * link) | |||
215 | 215 | ||
216 | if ((info->manf_id == MANFID_MACNICA) || (info->manf_id == MANFID_PIONEER) || (info->manf_id == 0x0098)) { | 216 | if ((info->manf_id == MANFID_MACNICA) || (info->manf_id == MANFID_PIONEER) || (info->manf_id == 0x0098)) { |
217 | /* set ATAcmd */ | 217 | /* set ATAcmd */ |
218 | outb(0xb4, link->io.BasePort1 + 0xd); | 218 | outb(0xb4, link->resource[0]->start + 0xd); |
219 | outb(0x24, link->io.BasePort1 + 0x9); | 219 | outb(0x24, link->resource[0]->start + 0x9); |
220 | outb(0x04, link->io.BasePort1 + 0xd); | 220 | outb(0x04, link->resource[0]->start + 0xd); |
221 | } | 221 | } |
222 | 222 | ||
223 | /* The KXL-810AN has a bigger IO port window */ | 223 | /* The KXL-810AN has a bigger IO port window */ |
224 | if (link->io.NumPorts1 == 32) | 224 | if (resource_size(link->resource[0]) == 32) |
225 | host = qlogic_detect(&qlogicfas_driver_template, link, | 225 | host = qlogic_detect(&qlogicfas_driver_template, link, |
226 | link->io.BasePort1 + 16, link->irq); | 226 | link->resource[0]->start + 16, link->irq); |
227 | else | 227 | else |
228 | host = qlogic_detect(&qlogicfas_driver_template, link, | 228 | host = qlogic_detect(&qlogicfas_driver_template, link, |
229 | link->io.BasePort1, link->irq); | 229 | link->resource[0]->start, link->irq); |
230 | 230 | ||
231 | if (!host) { | 231 | if (!host) { |
232 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); | 232 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); |
@@ -268,9 +268,9 @@ static int qlogic_resume(struct pcmcia_device *link) | |||
268 | if ((info->manf_id == MANFID_MACNICA) || | 268 | if ((info->manf_id == MANFID_MACNICA) || |
269 | (info->manf_id == MANFID_PIONEER) || | 269 | (info->manf_id == MANFID_PIONEER) || |
270 | (info->manf_id == 0x0098)) { | 270 | (info->manf_id == 0x0098)) { |
271 | outb(0x80, link->io.BasePort1 + 0xd); | 271 | outb(0x80, link->resource[0]->start + 0xd); |
272 | outb(0x24, link->io.BasePort1 + 0x9); | 272 | outb(0x24, link->resource[0]->start + 0x9); |
273 | outb(0x04, link->io.BasePort1 + 0xd); | 273 | outb(0x04, link->resource[0]->start + 0xd); |
274 | } | 274 | } |
275 | /* Ugggglllyyyy!!! */ | 275 | /* Ugggglllyyyy!!! */ |
276 | qlogicfas408_bus_reset(NULL); | 276 | qlogicfas408_bus_reset(NULL); |
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index bd79e45ab856..d99c0cbad2de 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -733,9 +733,9 @@ SYM53C500_config(struct pcmcia_device *link) | |||
733 | (info->manf_id == MANFID_PIONEER) || | 733 | (info->manf_id == MANFID_PIONEER) || |
734 | (info->manf_id == 0x0098)) { | 734 | (info->manf_id == 0x0098)) { |
735 | /* set ATAcmd */ | 735 | /* set ATAcmd */ |
736 | outb(0xb4, link->io.BasePort1 + 0xd); | 736 | outb(0xb4, link->resource[0]->start + 0xd); |
737 | outb(0x24, link->io.BasePort1 + 0x9); | 737 | outb(0x24, link->resource[0]->start + 0x9); |
738 | outb(0x04, link->io.BasePort1 + 0xd); | 738 | outb(0x04, link->resource[0]->start + 0xd); |
739 | } | 739 | } |
740 | 740 | ||
741 | /* | 741 | /* |
@@ -748,7 +748,7 @@ SYM53C500_config(struct pcmcia_device *link) | |||
748 | * 0x130, 0x230, 0x280, 0x290, | 748 | * 0x130, 0x230, 0x280, 0x290, |
749 | * 0x320, 0x330, 0x340, 0x350 | 749 | * 0x320, 0x330, 0x340, 0x350 |
750 | */ | 750 | */ |
751 | port_base = link->io.BasePort1; | 751 | port_base = link->resource[0]->start; |
752 | irq_level = link->irq; | 752 | irq_level = link->irq; |
753 | 753 | ||
754 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", | 754 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", |
@@ -821,15 +821,15 @@ static int sym53c500_resume(struct pcmcia_device *link) | |||
821 | if ((info->manf_id == MANFID_MACNICA) || | 821 | if ((info->manf_id == MANFID_MACNICA) || |
822 | (info->manf_id == MANFID_PIONEER) || | 822 | (info->manf_id == MANFID_PIONEER) || |
823 | (info->manf_id == 0x0098)) { | 823 | (info->manf_id == 0x0098)) { |
824 | outb(0x80, link->io.BasePort1 + 0xd); | 824 | outb(0x80, link->resource[0]->start + 0xd); |
825 | outb(0x24, link->io.BasePort1 + 0x9); | 825 | outb(0x24, link->resource[0]->start + 0x9); |
826 | outb(0x04, link->io.BasePort1 + 0xd); | 826 | outb(0x04, link->resource[0]->start + 0xd); |
827 | } | 827 | } |
828 | /* | 828 | /* |
829 | * If things don't work after a "resume", | 829 | * If things don't work after a "resume", |
830 | * this is a good place to start looking. | 830 | * this is a good place to start looking. |
831 | */ | 831 | */ |
832 | SYM53C500_int_host_reset(link->io.BasePort1); | 832 | SYM53C500_int_host_reset(link->resource[0]->start); |
833 | 833 | ||
834 | return 0; | 834 | return 0; |
835 | } | 835 | } |