aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index f410d0eb2fe..09b1795516f 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_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/ciscode.h> 25#include <pcmcia/ciscode.h>
@@ -76,9 +75,8 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
76{ 75{
77 76
78 /* The io structure describes IO port mapping */ 77 /* The io structure describes IO port mapping */
79 p_dev->io.NumPorts1 = 16; 78 p_dev->resource[0]->end = 16;
80 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 79 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
81 p_dev->io.NumPorts2 = 0;
82 80
83 /* General socket configuration */ 81 /* General socket configuration */
84 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 82 p_dev->conf.Attributes = CONF_ENABLE_IRQ;
@@ -120,13 +118,9 @@ static int avmcs_configcheck(struct pcmcia_device *p_dev,
120 if (cf->io.nwin <= 0) 118 if (cf->io.nwin <= 0)
121 return -ENODEV; 119 return -ENODEV;
122 120
123 p_dev->io.BasePort1 = cf->io.win[0].base; 121 p_dev->resource[0]->start = cf->io.win[0].base;
124 p_dev->io.NumPorts1 = cf->io.win[0].len; 122 p_dev->resource[0]->end = cf->io.win[0].len;
125 p_dev->io.NumPorts2 = 0; 123 return pcmcia_request_io(p_dev);
126 printk(KERN_INFO "avm_cs: testing i/o %#x-%#x\n",
127 p_dev->io.BasePort1,
128 p_dev->io.BasePort1+p_dev->io.NumPorts1-1);
129 return pcmcia_request_io(p_dev, &p_dev->io);
130} 124}
131 125
132static int avmcs_config(struct pcmcia_device *link) 126static int avmcs_config(struct pcmcia_device *link)
@@ -192,9 +186,10 @@ static int avmcs_config(struct pcmcia_device *link)
192 default: 186 default:
193 case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; 187 case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break;
194 } 188 }
195 if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) { 189 if ((i = (*addcard)(link->resource[0]->start, link->irq)) < 0) {
196 dev_err(&link->dev, "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n", 190 dev_err(&link->dev,
197 link->io.BasePort1, link->irq); 191 "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n",
192 (unsigned int) link->resource[0]->start, link->irq);
198 avmcs_release(link); 193 avmcs_release(link);
199 return -ENODEV; 194 return -ENODEV;
200 } 195 }
@@ -212,7 +207,7 @@ static int avmcs_config(struct pcmcia_device *link)
212 207
213static void avmcs_release(struct pcmcia_device *link) 208static void avmcs_release(struct pcmcia_device *link)
214{ 209{
215 b1pcmcia_delcard(link->io.BasePort1, link->irq); 210 b1pcmcia_delcard(link->resource[0]->start, link->irq);
216 pcmcia_disable_device(link); 211 pcmcia_disable_device(link);
217} /* avmcs_release */ 212} /* avmcs_release */
218 213