mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] Acked-by: Marcel Holtmann <[email protected]> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
parent
2ce4905e4d
commit
9a017a9103
51 changed files with 223 additions and 240 deletions
|
|
@ -191,9 +191,10 @@ static int avmcs_config(struct pcmcia_device *link)
|
|||
default:
|
||||
case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break;
|
||||
}
|
||||
if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) {
|
||||
dev_err(&link->dev, "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n",
|
||||
link->io.BasePort1, link->irq);
|
||||
if ((i = (*addcard)(link->resource[0]->start, link->irq)) < 0) {
|
||||
dev_err(&link->dev,
|
||||
"avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n",
|
||||
(unsigned int) link->resource[0]->start, link->irq);
|
||||
avmcs_release(link);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
@ -211,7 +212,7 @@ static int avmcs_config(struct pcmcia_device *link)
|
|||
|
||||
static void avmcs_release(struct pcmcia_device *link)
|
||||
{
|
||||
b1pcmcia_delcard(link->io.BasePort1, link->irq);
|
||||
b1pcmcia_delcard(link->resource[0]->start, link->irq);
|
||||
pcmcia_disable_device(link);
|
||||
} /* avmcs_release */
|
||||
|
||||
|
|
|
|||
|
|
@ -180,16 +180,18 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
|
|||
}
|
||||
|
||||
printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n",
|
||||
link->io.BasePort1, link->irq);
|
||||
(unsigned int) link->resource[0]->start, link->irq);
|
||||
|
||||
icard.para[0] = link->irq;
|
||||
icard.para[1] = link->io.BasePort1;
|
||||
icard.para[1] = link->resource[0]->start;
|
||||
icard.protocol = isdnprot;
|
||||
icard.typ = ISDN_CTYPE_A1_PCMCIA;
|
||||
|
||||
i = hisax_init_pcmcia(link, &busy, &icard);
|
||||
if (i < 0) {
|
||||
printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#x\n", i, link->io.BasePort1);
|
||||
printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 "
|
||||
"PCMCIA %d at i/o %#x\n", i,
|
||||
(unsigned int) link->resource[0]->start);
|
||||
avma1cs_release(link);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,23 +214,21 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
|
|||
link->conf.ConfigIndex);
|
||||
if (link->conf.Attributes & CONF_ENABLE_IRQ)
|
||||
printk(", irq %d", link->irq);
|
||||
if (link->io.NumPorts1)
|
||||
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
|
||||
link->io.BasePort1+link->io.NumPorts1-1);
|
||||
if (link->io.NumPorts2)
|
||||
printk(" & 0x%04x-0x%04x", link->io.BasePort2,
|
||||
link->io.BasePort2+link->io.NumPorts2-1);
|
||||
if (link->resource[0])
|
||||
printk(" & %pR", link->resource[0]);
|
||||
if (link->resource[1])
|
||||
printk(" & %pR", link->resource[1]);
|
||||
printk("\n");
|
||||
|
||||
icard.para[0] = link->irq;
|
||||
icard.para[1] = link->io.BasePort1;
|
||||
icard.para[1] = link->resource[0]->start;
|
||||
icard.protocol = protocol;
|
||||
icard.typ = ISDN_CTYPE_ELSA_PCMCIA;
|
||||
|
||||
i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
|
||||
if (i < 0) {
|
||||
printk(KERN_ERR "elsa_cs: failed to initialize Elsa PCMCIA %d at i/o %#x\n",
|
||||
i, link->io.BasePort1);
|
||||
printk(KERN_ERR "elsa_cs: failed to initialize Elsa "
|
||||
"PCMCIA %d with %pR\n", i, link->resource[0]);
|
||||
elsa_cs_release(link);
|
||||
} else
|
||||
((local_info_t*)link->priv)->cardnr = i;
|
||||
|
|
|
|||
|
|
@ -296,27 +296,25 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
|
|||
printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
|
||||
if (link->conf.Attributes & CONF_ENABLE_IRQ)
|
||||
printk(", irq %d", link->irq);
|
||||
if (link->io.NumPorts1)
|
||||
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
|
||||
link->io.BasePort1+link->io.NumPorts1-1);
|
||||
if (link->io.NumPorts2)
|
||||
printk(" & 0x%04x-0x%04x", link->io.BasePort2,
|
||||
link->io.BasePort2+link->io.NumPorts2-1);
|
||||
if (link->resource[0])
|
||||
printk(" & %pR", link->resource[0]);
|
||||
if (link->resource[1])
|
||||
printk(" & %pR", link->resource[1]);
|
||||
if (link->win)
|
||||
printk(", mem 0x%06lx-0x%06lx", req->Base,
|
||||
req->Base+req->Size-1);
|
||||
printk("\n");
|
||||
|
||||
icard.para[0] = link->irq;
|
||||
icard.para[1] = link->io.BasePort1;
|
||||
icard.para[1] = link->resource[0]->start;
|
||||
icard.protocol = protocol;
|
||||
icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA;
|
||||
|
||||
ret = hisax_init_pcmcia(link,
|
||||
&(((local_info_t *)link->priv)->stop), &icard);
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n",
|
||||
ret, link->io.BasePort1);
|
||||
printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d with %pR\n",
|
||||
ret, link->resource[0]);
|
||||
sedlbauer_release(link);
|
||||
return -ENODEV;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -194,23 +194,21 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
|
|||
link->conf.ConfigIndex);
|
||||
if (link->conf.Attributes & CONF_ENABLE_IRQ)
|
||||
printk(", irq %d", link->irq);
|
||||
if (link->io.NumPorts1)
|
||||
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
|
||||
link->io.BasePort1+link->io.NumPorts1-1);
|
||||
if (link->io.NumPorts2)
|
||||
printk(" & 0x%04x-0x%04x", link->io.BasePort2,
|
||||
link->io.BasePort2+link->io.NumPorts2-1);
|
||||
if (link->resource[0])
|
||||
printk(" & %pR", link->resource[0]);
|
||||
if (link->resource[1])
|
||||
printk(" & %pR", link->resource[1]);
|
||||
printk("\n");
|
||||
|
||||
icard.para[0] = link->irq;
|
||||
icard.para[1] = link->io.BasePort1;
|
||||
icard.para[1] = link->resource[0]->start;
|
||||
icard.protocol = protocol;
|
||||
icard.typ = ISDN_CTYPE_TELESPCMCIA;
|
||||
|
||||
i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
|
||||
if (i < 0) {
|
||||
printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n",
|
||||
i, link->io.BasePort1);
|
||||
i, (unsigned int) link->resource[0]->start);
|
||||
teles_cs_release(link);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue