mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -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
|
|
@ -688,7 +688,6 @@ static int bt3c_check_config(struct pcmcia_device *p_dev,
|
|||
p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
|
||||
if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
|
||||
(cf->io.win[0].base != 0)) {
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
p_dev->io.IOAddrLines = (try == 0) ? 16 :
|
||||
cf->io.flags & CISTPL_IO_LINES_MASK;
|
||||
|
|
@ -706,7 +705,6 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev,
|
|||
int j;
|
||||
|
||||
if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
for (j = 0; j < 5; j++) {
|
||||
p_dev->io.BasePort1 = base[j];
|
||||
p_dev->io.IOAddrLines = base[j] ? 16 : 3;
|
||||
|
|
|
|||
|
|
@ -617,7 +617,6 @@ static int btuart_check_config(struct pcmcia_device *p_dev,
|
|||
p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
|
||||
if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
|
||||
(cf->io.win[0].base != 0)) {
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
p_dev->io.IOAddrLines = (try == 0) ? 16 :
|
||||
cf->io.flags & CISTPL_IO_LINES_MASK;
|
||||
|
|
@ -635,7 +634,6 @@ static int btuart_check_config_notpicky(struct pcmcia_device *p_dev,
|
|||
int j;
|
||||
|
||||
if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
for (j = 0; j < 5; j++) {
|
||||
p_dev->io.BasePort1 = base[j];
|
||||
p_dev->io.IOAddrLines = base[j] ? 16 : 3;
|
||||
|
|
|
|||
|
|
@ -595,7 +595,6 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev,
|
|||
void *priv_data)
|
||||
{
|
||||
if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
|
||||
p_dev->conf.ConfigIndex = cf->index;
|
||||
p_dev->io.BasePort1 = cf->io.win[0].base;
|
||||
p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */
|
||||
p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
|
||||
|
|
|
|||
Loading…
Reference in a new issue