aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 15:25:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 15:25:06 -0400
commit1685e633b396b0f3dabbc9fa5d65dfefe6435250 (patch)
treeee83e26e2468ca1518a1b065c690159e12c8def9 /drivers/isdn/hardware
parent1cfd2bda8c486ae0e7a8005354758ebb68172bca (diff)
parent127c03cdbad9bd5af5d7f33bd31a1015a90cb77f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq pcmcia: do not request windows if you don't need to pcmcia: insert PCMCIA device resources into resource tree pcmcia: export resource information to sysfs pcmcia: use struct resource for PCMCIA devices, part 2 pcmcia: remove memreq_t pcmcia: move local definitions out of include/pcmcia/cs.h pcmcia: do not use io_req_t when calling pcmcia_request_io() pcmcia: do not use io_req_t after call to pcmcia_request_io() pcmcia: use struct resource for PCMCIA devices pcmcia: clean up cs.h pcmcia: use pcmica_{read,write}_config_byte pcmcia: remove cs_types.h pcmcia: remove unused flag, simplify headers pcmcia: remove obsolete CS_EVENT_ definitions pcmcia: split up central event handler pcmcia: simplify event callback pcmcia: remove obsolete ioctl Conflicts in: - drivers/staging/comedi/drivers/* - drivers/staging/wlags49_h2/wl_cs.c due to dev_info_t and whitespace changes
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 f410d0eb2fef..09b1795516f4 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