diff options
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 5ddfd46dea65..0cf3ef30625e 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -935,6 +935,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, | |||
935 | int (*conf_check) (struct pcmcia_device *p_dev, | 935 | int (*conf_check) (struct pcmcia_device *p_dev, |
936 | cistpl_cftable_entry_t *cfg, | 936 | cistpl_cftable_entry_t *cfg, |
937 | cistpl_cftable_entry_t *dflt, | 937 | cistpl_cftable_entry_t *dflt, |
938 | unsigned int vcc, | ||
938 | void *priv_data), | 939 | void *priv_data), |
939 | void *priv_data) | 940 | void *priv_data) |
940 | { | 941 | { |
@@ -942,11 +943,15 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, | |||
942 | 943 | ||
943 | tuple_t *tuple; | 944 | tuple_t *tuple; |
944 | int ret = -ENODEV; | 945 | int ret = -ENODEV; |
946 | unsigned int vcc; | ||
945 | 947 | ||
946 | cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL); | 948 | cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL); |
947 | if (cfg_mem == NULL) | 949 | if (cfg_mem == NULL) |
948 | return -ENOMEM; | 950 | return -ENOMEM; |
949 | 951 | ||
952 | /* get the current Vcc setting */ | ||
953 | vcc = p_dev->socket->socket.Vcc; | ||
954 | |||
950 | tuple = &cfg_mem->tuple; | 955 | tuple = &cfg_mem->tuple; |
951 | tuple->TupleData = cfg_mem->buf; | 956 | tuple->TupleData = cfg_mem->buf; |
952 | tuple->TupleDataMax = 255; | 957 | tuple->TupleDataMax = 255; |
@@ -969,7 +974,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, | |||
969 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) | 974 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) |
970 | cfg_mem->dflt = *cfg; | 975 | cfg_mem->dflt = *cfg; |
971 | 976 | ||
972 | ret = conf_check(p_dev, cfg, &cfg_mem->dflt, priv_data); | 977 | ret = conf_check(p_dev, cfg, &cfg_mem->dflt, vcc, priv_data); |
973 | if (!ret) | 978 | if (!ret) |
974 | break; | 979 | break; |
975 | 980 | ||