aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-02 08:59:13 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-22 19:21:29 -0400
commit498ac1899b62626bf6879a251d75c22ec564c559 (patch)
treed17c6c02ac97db98ac343a7ca1190147047385b2 /drivers/pcmcia
parent84e2d34004dcd0c90d1af43a143511b334f11a4d (diff)
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 9f054bc847f2..ba34ac8876ff 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,
953 953
954 ret = pcmcia_get_first_tuple(p_dev, tuple); 954 ret = pcmcia_get_first_tuple(p_dev, tuple);
955 while (!ret) { 955 while (!ret) {
956 cistpl_cftable_entry_t *cfg = &cfg_mem->parse.cftable_entry;
957
956 if (pcmcia_get_tuple_data(p_dev, tuple)) 958 if (pcmcia_get_tuple_data(p_dev, tuple))
957 goto next_entry; 959 goto next_entry;
958 960
959 if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse)) 961 if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse))
960 goto next_entry; 962 goto next_entry;
961 963
962 ret = conf_check(p_dev, &cfg_mem->parse.cftable_entry, 964 /* default values */
963 priv_data); 965 p_dev->conf.ConfigIndex = cfg->index;
966
967 ret = conf_check(p_dev, cfg, priv_data);
964 if (!ret) 968 if (!ret)
965 break; 969 break;
966 970