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/scsi/pcmcia/aha152x_stub.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/scsi/pcmcia/aha152x_stub.c')
-rw-r--r-- | drivers/scsi/pcmcia/aha152x_stub.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 3e040f503afa..61f49bdcc0c2 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
@@ -100,9 +100,8 @@ static int aha152x_probe(struct pcmcia_device *link) | |||
100 | info->p_dev = link; | 100 | info->p_dev = link; |
101 | link->priv = info; | 101 | link->priv = info; |
102 | 102 | ||
103 | link->io.NumPorts1 = 0x20; | 103 | link->resource[0]->end = 0x20; |
104 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 104 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
105 | link->io.IOAddrLines = 10; | ||
106 | link->conf.Attributes = CONF_ENABLE_IRQ; | 105 | link->conf.Attributes = CONF_ENABLE_IRQ; |
107 | link->conf.IntType = INT_MEMORY_AND_IO; | 106 | link->conf.IntType = INT_MEMORY_AND_IO; |
108 | link->conf.Present = PRESENT_OPTION; | 107 | link->conf.Present = PRESENT_OPTION; |
@@ -130,15 +129,16 @@ static int aha152x_config_check(struct pcmcia_device *p_dev, | |||
130 | unsigned int vcc, | 129 | unsigned int vcc, |
131 | void *priv_data) | 130 | void *priv_data) |
132 | { | 131 | { |
132 | p_dev->io_lines = 10; | ||
133 | /* For New Media T&J, look for a SCSI window */ | 133 | /* For New Media T&J, look for a SCSI window */ |
134 | if (cfg->io.win[0].len >= 0x20) | 134 | if (cfg->io.win[0].len >= 0x20) |
135 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 135 | p_dev->resource[0]->start = cfg->io.win[0].base; |
136 | else if ((cfg->io.nwin > 1) && | 136 | else if ((cfg->io.nwin > 1) && |
137 | (cfg->io.win[1].len >= 0x20)) | 137 | (cfg->io.win[1].len >= 0x20)) |
138 | p_dev->io.BasePort1 = cfg->io.win[1].base; | 138 | p_dev->resource[0]->start = cfg->io.win[1].base; |
139 | if ((cfg->io.nwin > 0) && | 139 | if ((cfg->io.nwin > 0) && |
140 | (p_dev->io.BasePort1 < 0xffff)) { | 140 | (p_dev->resource[0]->start < 0xffff)) { |
141 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | 141 | if (!pcmcia_request_io(p_dev)) |
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | return -EINVAL; | 144 | return -EINVAL; |