summaryrefslogtreecommitdiff
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-02 12:59:13 (GMT)
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-22 23:21:29 (GMT)
commit498ac1899b62626bf6879a251d75c22ec564c559 (patch)
treed17c6c02ac97db98ac343a7ca1190147047385b2 /drivers/pcmcia
parent84e2d34004dcd0c90d1af43a143511b334f11a4d (diff)
downloadlinux-498ac1899b62626bf6879a251d75c22ec564c559.tar.xz
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 <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pcmcia_resource.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 9f054bc..ba34ac8 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -953,14 +953,18 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
ret = pcmcia_get_first_tuple(p_dev, tuple);
while (!ret) {
+ cistpl_cftable_entry_t *cfg = &cfg_mem->parse.cftable_entry;
+
if (pcmcia_get_tuple_data(p_dev, tuple))
goto next_entry;
if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse))
goto next_entry;
- ret = conf_check(p_dev, &cfg_mem->parse.cftable_entry,
- priv_data);
+ /* default values */
+ p_dev->conf.ConfigIndex = cfg->index;
+
+ ret = conf_check(p_dev, cfg, priv_data);
if (!ret)
break;