aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pcmcia_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r--drivers/pcmcia/pcmcia_resource.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index ba34ac8876ff..5ddfd46dea65 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -915,6 +915,7 @@ struct pcmcia_cfg_mem {
915 tuple_t tuple; 915 tuple_t tuple;
916 cisparse_t parse; 916 cisparse_t parse;
917 u8 buf[256]; 917 u8 buf[256];
918 cistpl_cftable_entry_t dflt;
918}; 919};
919 920
920/** 921/**
@@ -933,10 +934,12 @@ struct pcmcia_cfg_mem {
933int pcmcia_loop_config(struct pcmcia_device *p_dev, 934int pcmcia_loop_config(struct pcmcia_device *p_dev,
934 int (*conf_check) (struct pcmcia_device *p_dev, 935 int (*conf_check) (struct pcmcia_device *p_dev,
935 cistpl_cftable_entry_t *cfg, 936 cistpl_cftable_entry_t *cfg,
937 cistpl_cftable_entry_t *dflt,
936 void *priv_data), 938 void *priv_data),
937 void *priv_data) 939 void *priv_data)
938{ 940{
939 struct pcmcia_cfg_mem *cfg_mem; 941 struct pcmcia_cfg_mem *cfg_mem;
942
940 tuple_t *tuple; 943 tuple_t *tuple;
941 int ret = -ENODEV; 944 int ret = -ENODEV;
942 945
@@ -963,8 +966,10 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
963 966
964 /* default values */ 967 /* default values */
965 p_dev->conf.ConfigIndex = cfg->index; 968 p_dev->conf.ConfigIndex = cfg->index;
969 if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
970 cfg_mem->dflt = *cfg;
966 971
967 ret = conf_check(p_dev, cfg, priv_data); 972 ret = conf_check(p_dev, cfg, &cfg_mem->dflt, priv_data);
968 if (!ret) 973 if (!ret)
969 break; 974 break;
970 975