mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
pcmcia: pcmcia_config_loop() ConfigIndex unification
Almost all drivers set p_dev->conf.ConfigIndex to cfg->index in the pcmcia_config_loop() callback function. Therefore, factor it out. Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
parent
84e2d34004
commit
498ac1899b
29 changed files with 6 additions and 46 deletions
|
|
@ -161,7 +161,6 @@ static int avmcs_configcheck(struct pcmcia_device *p_dev,
|
|||
if (cf->io.nwin <= 0)
|
||||
return -ENODEV;
|
||||
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
p_dev->io.NumPorts1 = cf->io.win[0].len;
|
||||
p_dev->io.NumPorts2 = 0;
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev,
|
|||
if (cf->io.nwin <= 0)
|
||||
return -ENODEV;
|
||||
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
p_dev->io.NumPorts1 = cf->io.win[0].len;
|
||||
p_dev->io.NumPorts2 = 0;
|
||||
|
|
|
|||
|
|
@ -212,13 +212,11 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev,
|
|||
|
||||
if ((cf->io.nwin > 0) && cf->io.win[0].base) {
|
||||
printk(KERN_INFO "(elsa_cs: looks like the 96 model)\n");
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
if (!pcmcia_request_io(p_dev, &p_dev->io))
|
||||
return 0;
|
||||
} else {
|
||||
printk(KERN_INFO "(elsa_cs: looks like the 97 model)\n");
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
for (j = 0x2f0; j > 0x100; j -= 0x10) {
|
||||
p_dev->io.BasePort1 = j;
|
||||
if (!pcmcia_request_io(p_dev, &p_dev->io))
|
||||
|
|
|
|||
|
|
@ -233,7 +233,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
|
|||
cfg_mem->dflt = *cfg;
|
||||
if (cfg->index == 0)
|
||||
return -ENODEV;
|
||||
p_dev->conf.ConfigIndex = cfg->index;
|
||||
|
||||
/* Does this card need audio output? */
|
||||
if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
|
||||
|
|
|
|||
|
|
@ -202,13 +202,11 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev,
|
|||
|
||||
if ((cf->io.nwin > 0) && cf->io.win[0].base) {
|
||||
printk(KERN_INFO "(teles_cs: looks like the 96 model)\n");
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
if (!pcmcia_request_io(p_dev, &p_dev->io))
|
||||
return 0;
|
||||
} else {
|
||||
printk(KERN_INFO "(teles_cs: looks like the 97 model)\n");
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
for (j = 0x2f0; j > 0x100; j -= 0x10) {
|
||||
p_dev->io.BasePort1 = j;
|
||||
if (!pcmcia_request_io(p_dev, &p_dev->io))
|
||||
|
|
|
|||
Loading…
Reference in a new issue