aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-24 09:58:54 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:03:59 -0400
commit9a017a910346afd88ec2e065989903bf211a7d37 (patch)
treeb407945c6e762f252bb81ae0fd64c745bba2ad11 /drivers/isdn
parent2ce4905e4da9f512b38f56a53ece9da2072dd164 (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/isdn')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c9
-rw-r--r--drivers/isdn/hisax/avma1_cs.c8
-rw-r--r--drivers/isdn/hisax/elsa_cs.c16
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c16
-rw-r--r--drivers/isdn/hisax/teles_cs.c14
5 files changed, 30 insertions, 33 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index e804a01ecdfb..7c8c51f22003 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -191,9 +191,10 @@ static int avmcs_config(struct pcmcia_device *link)
191 default: 191 default:
192 case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; 192 case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break;
193 } 193 }
194 if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) { 194 if ((i = (*addcard)(link->resource[0]->start, link->irq)) < 0) {
195 dev_err(&link->dev, "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n", 195 dev_err(&link->dev,
196 link->io.BasePort1, link->irq); 196 "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n",
197 (unsigned int) link->resource[0]->start, link->irq);
197 avmcs_release(link); 198 avmcs_release(link);
198 return -ENODEV; 199 return -ENODEV;
199 } 200 }
@@ -211,7 +212,7 @@ static int avmcs_config(struct pcmcia_device *link)
211 212
212static void avmcs_release(struct pcmcia_device *link) 213static void avmcs_release(struct pcmcia_device *link)
213{ 214{
214 b1pcmcia_delcard(link->io.BasePort1, link->irq); 215 b1pcmcia_delcard(link->resource[0]->start, link->irq);
215 pcmcia_disable_device(link); 216 pcmcia_disable_device(link);
216} /* avmcs_release */ 217} /* avmcs_release */
217 218
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 49e141e49aaf..88899638f835 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -180,16 +180,18 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
180 } 180 }
181 181
182 printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", 182 printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n",
183 link->io.BasePort1, link->irq); 183 (unsigned int) link->resource[0]->start, link->irq);
184 184
185 icard.para[0] = link->irq; 185 icard.para[0] = link->irq;
186 icard.para[1] = link->io.BasePort1; 186 icard.para[1] = link->resource[0]->start;
187 icard.protocol = isdnprot; 187 icard.protocol = isdnprot;
188 icard.typ = ISDN_CTYPE_A1_PCMCIA; 188 icard.typ = ISDN_CTYPE_A1_PCMCIA;
189 189
190 i = hisax_init_pcmcia(link, &busy, &icard); 190 i = hisax_init_pcmcia(link, &busy, &icard);
191 if (i < 0) { 191 if (i < 0) {
192 printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#x\n", i, link->io.BasePort1); 192 printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 "
193 "PCMCIA %d at i/o %#x\n", i,
194 (unsigned int) link->resource[0]->start);
193 avma1cs_release(link); 195 avma1cs_release(link);
194 return -ENODEV; 196 return -ENODEV;
195 } 197 }
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 425deea1dd69..c10bfd3f4588 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -214,23 +214,21 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
214 link->conf.ConfigIndex); 214 link->conf.ConfigIndex);
215 if (link->conf.Attributes & CONF_ENABLE_IRQ) 215 if (link->conf.Attributes & CONF_ENABLE_IRQ)
216 printk(", irq %d", link->irq); 216 printk(", irq %d", link->irq);
217 if (link->io.NumPorts1) 217 if (link->resource[0])
218 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 218 printk(" & %pR", link->resource[0]);
219 link->io.BasePort1+link->io.NumPorts1-1); 219 if (link->resource[1])
220 if (link->io.NumPorts2) 220 printk(" & %pR", link->resource[1]);
221 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
222 link->io.BasePort2+link->io.NumPorts2-1);
223 printk("\n"); 221 printk("\n");
224 222
225 icard.para[0] = link->irq; 223 icard.para[0] = link->irq;
226 icard.para[1] = link->io.BasePort1; 224 icard.para[1] = link->resource[0]->start;
227 icard.protocol = protocol; 225 icard.protocol = protocol;
228 icard.typ = ISDN_CTYPE_ELSA_PCMCIA; 226 icard.typ = ISDN_CTYPE_ELSA_PCMCIA;
229 227
230 i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); 228 i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
231 if (i < 0) { 229 if (i < 0) {
232 printk(KERN_ERR "elsa_cs: failed to initialize Elsa PCMCIA %d at i/o %#x\n", 230 printk(KERN_ERR "elsa_cs: failed to initialize Elsa "
233 i, link->io.BasePort1); 231 "PCMCIA %d with %pR\n", i, link->resource[0]);
234 elsa_cs_release(link); 232 elsa_cs_release(link);
235 } else 233 } else
236 ((local_info_t*)link->priv)->cardnr = i; 234 ((local_info_t*)link->priv)->cardnr = i;
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 5dbad966a29e..cecb35ab9d3d 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -296,27 +296,25 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
296 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); 296 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
297 if (link->conf.Attributes & CONF_ENABLE_IRQ) 297 if (link->conf.Attributes & CONF_ENABLE_IRQ)
298 printk(", irq %d", link->irq); 298 printk(", irq %d", link->irq);
299 if (link->io.NumPorts1) 299 if (link->resource[0])
300 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 300 printk(" & %pR", link->resource[0]);
301 link->io.BasePort1+link->io.NumPorts1-1); 301 if (link->resource[1])
302 if (link->io.NumPorts2) 302 printk(" & %pR", link->resource[1]);
303 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
304 link->io.BasePort2+link->io.NumPorts2-1);
305 if (link->win) 303 if (link->win)
306 printk(", mem 0x%06lx-0x%06lx", req->Base, 304 printk(", mem 0x%06lx-0x%06lx", req->Base,
307 req->Base+req->Size-1); 305 req->Base+req->Size-1);
308 printk("\n"); 306 printk("\n");
309 307
310 icard.para[0] = link->irq; 308 icard.para[0] = link->irq;
311 icard.para[1] = link->io.BasePort1; 309 icard.para[1] = link->resource[0]->start;
312 icard.protocol = protocol; 310 icard.protocol = protocol;
313 icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; 311 icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA;
314 312
315 ret = hisax_init_pcmcia(link, 313 ret = hisax_init_pcmcia(link,
316 &(((local_info_t *)link->priv)->stop), &icard); 314 &(((local_info_t *)link->priv)->stop), &icard);
317 if (ret < 0) { 315 if (ret < 0) {
318 printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n", 316 printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d with %pR\n",
319 ret, link->io.BasePort1); 317 ret, link->resource[0]);
320 sedlbauer_release(link); 318 sedlbauer_release(link);
321 return -ENODEV; 319 return -ENODEV;
322 } else 320 } else
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index d3fb1b716800..3787fc70cf8f 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -194,23 +194,21 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
194 link->conf.ConfigIndex); 194 link->conf.ConfigIndex);
195 if (link->conf.Attributes & CONF_ENABLE_IRQ) 195 if (link->conf.Attributes & CONF_ENABLE_IRQ)
196 printk(", irq %d", link->irq); 196 printk(", irq %d", link->irq);
197 if (link->io.NumPorts1) 197 if (link->resource[0])
198 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 198 printk(" & %pR", link->resource[0]);
199 link->io.BasePort1+link->io.NumPorts1-1); 199 if (link->resource[1])
200 if (link->io.NumPorts2) 200 printk(" & %pR", link->resource[1]);
201 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
202 link->io.BasePort2+link->io.NumPorts2-1);
203 printk("\n"); 201 printk("\n");
204 202
205 icard.para[0] = link->irq; 203 icard.para[0] = link->irq;
206 icard.para[1] = link->io.BasePort1; 204 icard.para[1] = link->resource[0]->start;
207 icard.protocol = protocol; 205 icard.protocol = protocol;
208 icard.typ = ISDN_CTYPE_TELESPCMCIA; 206 icard.typ = ISDN_CTYPE_TELESPCMCIA;
209 207
210 i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); 208 i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
211 if (i < 0) { 209 if (i < 0) {
212 printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n", 210 printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n",
213 i, link->io.BasePort1); 211 i, (unsigned int) link->resource[0]->start);
214 teles_cs_release(link); 212 teles_cs_release(link);
215 return -ENODEV; 213 return -ENODEV;
216 } 214 }