summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/nsp_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pcmcia/nsp_cs.c')
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index aee24b745dc9..aa4523462578 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1612,17 +1612,15 @@ struct nsp_cs_configdata {
nsp_hw_data *data;
win_req_t req;
config_info_t conf;
- cistpl_cftable_entry_t dflt;
};
static int nsp_cs_config_check(struct pcmcia_device *p_dev,
cistpl_cftable_entry_t *cfg,
+ cistpl_cftable_entry_t *dflt,
void *priv_data)
{
struct nsp_cs_configdata *cfg_mem = priv_data;
- if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
- memcpy(&cfg_mem->dflt, cfg, sizeof(cistpl_cftable_entry_t));
if (cfg->index == 0)
return -ENODEV;
@@ -1637,28 +1635,27 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) {
if (cfg_mem->conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM]/10000)
return -ENODEV;
- else if (cfg_mem->dflt.vcc.present & (1<<CISTPL_POWER_VNOM)) {
- if (cfg_mem->conf.Vcc != cfg_mem->dflt.vcc.param[CISTPL_POWER_VNOM]/10000)
+ else if (dflt->vcc.present & (1<<CISTPL_POWER_VNOM)) {
+ if (cfg_mem->conf.Vcc != dflt->vcc.param[CISTPL_POWER_VNOM]/10000)
return -ENODEV;
}
if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) {
p_dev->conf.Vpp =
cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
- } else if (cfg_mem->dflt.vpp1.present & (1 << CISTPL_POWER_VNOM)) {
+ } else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) {
p_dev->conf.Vpp =
- cfg_mem->dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
+ dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
}
/* Do we need to allocate an interrupt? */
- if (cfg->irq.IRQInfo1 || cfg_mem->dflt.irq.IRQInfo1) {
+ if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
- }
/* IO window settings */
p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
- if ((cfg->io.nwin > 0) || (cfg_mem->dflt.io.nwin > 0)) {
- cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &cfg_mem->dflt.io;
+ if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
+ cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
if (!(io->flags & CISTPL_IO_8BIT))
p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
@@ -1677,10 +1674,10 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
goto next_entry;
}
- if ((cfg->mem.nwin > 0) || (cfg_mem->dflt.mem.nwin > 0)) {
+ if ((cfg->mem.nwin > 0) || (dflt->mem.nwin > 0)) {
memreq_t map;
cistpl_mem_t *mem =
- (cfg->mem.nwin) ? &cfg->mem : &cfg_mem->dflt.mem;
+ (cfg->mem.nwin) ? &cfg->mem : &dflt->mem;
cfg_mem->req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
cfg_mem->req.Attributes |= WIN_ENABLE;
cfg_mem->req.Base = mem->win[0].host_addr;
OpenPOWER on IntegriCloud