diff options
Diffstat (limited to 'drivers/isdn/hisax/avma1_cs.c')
-rw-r--r-- | drivers/isdn/hisax/avma1_cs.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index a80a7617f16f..94263c22b874 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | 22 | ||
23 | #include <pcmcia/cs_types.h> | ||
24 | #include <pcmcia/cs.h> | 23 | #include <pcmcia/cs.h> |
25 | #include <pcmcia/cistpl.h> | 24 | #include <pcmcia/cistpl.h> |
26 | #include <pcmcia/ds.h> | 25 | #include <pcmcia/ds.h> |
@@ -79,11 +78,10 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | |||
79 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); | 78 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); |
80 | 79 | ||
81 | /* The io structure describes IO port mapping */ | 80 | /* The io structure describes IO port mapping */ |
82 | p_dev->io.NumPorts1 = 16; | 81 | p_dev->resource[0]->end = 16; |
83 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 82 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
84 | p_dev->io.NumPorts2 = 16; | 83 | p_dev->resource[1]->end = 16; |
85 | p_dev->io.Attributes2 = IO_DATA_PATH_WIDTH_16; | 84 | p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_16; |
86 | p_dev->io.IOAddrLines = 5; | ||
87 | 85 | ||
88 | /* General socket configuration */ | 86 | /* General socket configuration */ |
89 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 87 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
@@ -127,13 +125,10 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev, | |||
127 | if (cf->io.nwin <= 0) | 125 | if (cf->io.nwin <= 0) |
128 | return -ENODEV; | 126 | return -ENODEV; |
129 | 127 | ||
130 | p_dev->io.BasePort1 = cf->io.win[0].base; | 128 | p_dev->resource[0]->start = cf->io.win[0].base; |
131 | p_dev->io.NumPorts1 = cf->io.win[0].len; | 129 | p_dev->resource[0]->end = cf->io.win[0].len; |
132 | p_dev->io.NumPorts2 = 0; | 130 | p_dev->io_lines = 5; |
133 | printk(KERN_INFO "avma1_cs: testing i/o %#x-%#x\n", | 131 | return pcmcia_request_io(p_dev); |
134 | p_dev->io.BasePort1, | ||
135 | p_dev->io.BasePort1+p_dev->io.NumPorts1-1); | ||
136 | return pcmcia_request_io(p_dev, &p_dev->io); | ||
137 | } | 132 | } |
138 | 133 | ||
139 | 134 | ||
@@ -181,16 +176,18 @@ static int __devinit avma1cs_config(struct pcmcia_device *link) | |||
181 | } | 176 | } |
182 | 177 | ||
183 | printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", | 178 | printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", |
184 | link->io.BasePort1, link->irq); | 179 | (unsigned int) link->resource[0]->start, link->irq); |
185 | 180 | ||
186 | icard.para[0] = link->irq; | 181 | icard.para[0] = link->irq; |
187 | icard.para[1] = link->io.BasePort1; | 182 | icard.para[1] = link->resource[0]->start; |
188 | icard.protocol = isdnprot; | 183 | icard.protocol = isdnprot; |
189 | icard.typ = ISDN_CTYPE_A1_PCMCIA; | 184 | icard.typ = ISDN_CTYPE_A1_PCMCIA; |
190 | 185 | ||
191 | i = hisax_init_pcmcia(link, &busy, &icard); | 186 | i = hisax_init_pcmcia(link, &busy, &icard); |
192 | if (i < 0) { | 187 | if (i < 0) { |
193 | printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#x\n", i, link->io.BasePort1); | 188 | printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 " |
189 | "PCMCIA %d at i/o %#x\n", i, | ||
190 | (unsigned int) link->resource[0]->start); | ||
194 | avma1cs_release(link); | 191 | avma1cs_release(link); |
195 | return -ENODEV; | 192 | return -ENODEV; |
196 | } | 193 | } |