aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
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/char
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/char')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c30
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c37
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c47
-rw-r--r--drivers/char/pcmcia/ipwireless/main.h1
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.h1
-rw-r--r--drivers/char/pcmcia/synclink_cs.c29
6 files changed, 51 insertions, 94 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index e7956acf2ad6..ec73d9f6d9ed 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -34,7 +34,6 @@
34#include <linux/uaccess.h> 34#include <linux/uaccess.h>
35#include <linux/io.h> 35#include <linux/io.h>
36 36
37#include <pcmcia/cs_types.h>
38#include <pcmcia/cs.h> 37#include <pcmcia/cs.h>
39#include <pcmcia/cistpl.h> 38#include <pcmcia/cistpl.h>
40#include <pcmcia/cisreg.h> 39#include <pcmcia/cisreg.h>
@@ -422,7 +421,7 @@ static struct card_fixup card_fixups[] = {
422static void set_cardparameter(struct cm4000_dev *dev) 421static void set_cardparameter(struct cm4000_dev *dev)
423{ 422{
424 int i; 423 int i;
425 unsigned int iobase = dev->p_dev->io.BasePort1; 424 unsigned int iobase = dev->p_dev->resource[0]->start;
426 u_int8_t stopbits = 0x02; /* ISO default */ 425 u_int8_t stopbits = 0x02; /* ISO default */
427 426
428 DEBUGP(3, dev, "-> set_cardparameter\n"); 427 DEBUGP(3, dev, "-> set_cardparameter\n");
@@ -455,7 +454,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
455 unsigned short num_bytes_read; 454 unsigned short num_bytes_read;
456 unsigned char pts_reply[4]; 455 unsigned char pts_reply[4];
457 ssize_t rc; 456 ssize_t rc;
458 unsigned int iobase = dev->p_dev->io.BasePort1; 457 unsigned int iobase = dev->p_dev->resource[0]->start;
459 458
460 rc = 0; 459 rc = 0;
461 460
@@ -664,7 +663,7 @@ static void terminate_monitor(struct cm4000_dev *dev)
664static void monitor_card(unsigned long p) 663static void monitor_card(unsigned long p)
665{ 664{
666 struct cm4000_dev *dev = (struct cm4000_dev *) p; 665 struct cm4000_dev *dev = (struct cm4000_dev *) p;
667 unsigned int iobase = dev->p_dev->io.BasePort1; 666 unsigned int iobase = dev->p_dev->resource[0]->start;
668 unsigned short s; 667 unsigned short s;
669 struct ptsreq ptsreq; 668 struct ptsreq ptsreq;
670 int i, atrc; 669 int i, atrc;
@@ -925,7 +924,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
925 loff_t *ppos) 924 loff_t *ppos)
926{ 925{
927 struct cm4000_dev *dev = filp->private_data; 926 struct cm4000_dev *dev = filp->private_data;
928 unsigned int iobase = dev->p_dev->io.BasePort1; 927 unsigned int iobase = dev->p_dev->resource[0]->start;
929 ssize_t rc; 928 ssize_t rc;
930 int i, j, k; 929 int i, j, k;
931 930
@@ -1048,7 +1047,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
1048 size_t count, loff_t *ppos) 1047 size_t count, loff_t *ppos)
1049{ 1048{
1050 struct cm4000_dev *dev = filp->private_data; 1049 struct cm4000_dev *dev = filp->private_data;
1051 unsigned int iobase = dev->p_dev->io.BasePort1; 1050 unsigned int iobase = dev->p_dev->resource[0]->start;
1052 unsigned short s; 1051 unsigned short s;
1053 unsigned char tmp; 1052 unsigned char tmp;
1054 unsigned char infolen; 1053 unsigned char infolen;
@@ -1401,7 +1400,7 @@ static void stop_monitor(struct cm4000_dev *dev)
1401static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 1400static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
1402{ 1401{
1403 struct cm4000_dev *dev = filp->private_data; 1402 struct cm4000_dev *dev = filp->private_data;
1404 unsigned int iobase = dev->p_dev->io.BasePort1; 1403 unsigned int iobase = dev->p_dev->resource[0]->start;
1405 struct inode *inode = filp->f_path.dentry->d_inode; 1404 struct inode *inode = filp->f_path.dentry->d_inode;
1406 struct pcmcia_device *link; 1405 struct pcmcia_device *link;
1407 int size; 1406 int size;
@@ -1752,17 +1751,12 @@ static int cm4000_config_check(struct pcmcia_device *p_dev,
1752 if (!cfg->io.nwin) 1751 if (!cfg->io.nwin)
1753 return -ENODEV; 1752 return -ENODEV;
1754 1753
1755 /* Get the IOaddr */ 1754 p_dev->resource[0]->start = cfg->io.win[0].base;
1756 p_dev->io.BasePort1 = cfg->io.win[0].base; 1755 p_dev->resource[0]->end = cfg->io.win[0].len;
1757 p_dev->io.NumPorts1 = cfg->io.win[0].len; 1756 p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags);
1758 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 1757 p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK;
1759 if (!(cfg->io.flags & CISTPL_IO_8BIT)) 1758
1760 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; 1759 return pcmcia_request_io(p_dev);
1761 if (!(cfg->io.flags & CISTPL_IO_16BIT))
1762 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
1763 p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
1764
1765 return pcmcia_request_io(p_dev, &p_dev->io);
1766} 1760}
1767 1761
1768static int cm4000_config(struct pcmcia_device * link, int devno) 1762static int cm4000_config(struct pcmcia_device * link, int devno)
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index c0775c844e08..815cde1d0570 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -29,7 +29,6 @@
29#include <asm/uaccess.h> 29#include <asm/uaccess.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <pcmcia/cs_types.h>
33#include <pcmcia/cs.h> 32#include <pcmcia/cs.h>
34#include <pcmcia/cistpl.h> 33#include <pcmcia/cistpl.h>
35#include <pcmcia/cisreg.h> 34#include <pcmcia/cisreg.h>
@@ -110,7 +109,7 @@ static inline unsigned char xinb(unsigned short port)
110static void cm4040_do_poll(unsigned long dummy) 109static void cm4040_do_poll(unsigned long dummy)
111{ 110{
112 struct reader_dev *dev = (struct reader_dev *) dummy; 111 struct reader_dev *dev = (struct reader_dev *) dummy;
113 unsigned int obs = xinb(dev->p_dev->io.BasePort1 112 unsigned int obs = xinb(dev->p_dev->resource[0]->start
114 + REG_OFFSET_BUFFER_STATUS); 113 + REG_OFFSET_BUFFER_STATUS);
115 114
116 if ((obs & BSR_BULK_IN_FULL)) { 115 if ((obs & BSR_BULK_IN_FULL)) {
@@ -141,7 +140,7 @@ static void cm4040_stop_poll(struct reader_dev *dev)
141static int wait_for_bulk_out_ready(struct reader_dev *dev) 140static int wait_for_bulk_out_ready(struct reader_dev *dev)
142{ 141{
143 int i, rc; 142 int i, rc;
144 int iobase = dev->p_dev->io.BasePort1; 143 int iobase = dev->p_dev->resource[0]->start;
145 144
146 for (i = 0; i < POLL_LOOP_COUNT; i++) { 145 for (i = 0; i < POLL_LOOP_COUNT; i++) {
147 if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS) 146 if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS)
@@ -171,7 +170,7 @@ static int wait_for_bulk_out_ready(struct reader_dev *dev)
171/* Write to Sync Control Register */ 170/* Write to Sync Control Register */
172static int write_sync_reg(unsigned char val, struct reader_dev *dev) 171static int write_sync_reg(unsigned char val, struct reader_dev *dev)
173{ 172{
174 int iobase = dev->p_dev->io.BasePort1; 173 int iobase = dev->p_dev->resource[0]->start;
175 int rc; 174 int rc;
176 175
177 rc = wait_for_bulk_out_ready(dev); 176 rc = wait_for_bulk_out_ready(dev);
@@ -189,7 +188,7 @@ static int write_sync_reg(unsigned char val, struct reader_dev *dev)
189static int wait_for_bulk_in_ready(struct reader_dev *dev) 188static int wait_for_bulk_in_ready(struct reader_dev *dev)
190{ 189{
191 int i, rc; 190 int i, rc;
192 int iobase = dev->p_dev->io.BasePort1; 191 int iobase = dev->p_dev->resource[0]->start;
193 192
194 for (i = 0; i < POLL_LOOP_COUNT; i++) { 193 for (i = 0; i < POLL_LOOP_COUNT; i++) {
195 if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS) 194 if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS)
@@ -219,7 +218,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
219 size_t count, loff_t *ppos) 218 size_t count, loff_t *ppos)
220{ 219{
221 struct reader_dev *dev = filp->private_data; 220 struct reader_dev *dev = filp->private_data;
222 int iobase = dev->p_dev->io.BasePort1; 221 int iobase = dev->p_dev->resource[0]->start;
223 size_t bytes_to_read; 222 size_t bytes_to_read;
224 unsigned long i; 223 unsigned long i;
225 size_t min_bytes_to_read; 224 size_t min_bytes_to_read;
@@ -321,7 +320,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
321 size_t count, loff_t *ppos) 320 size_t count, loff_t *ppos)
322{ 321{
323 struct reader_dev *dev = filp->private_data; 322 struct reader_dev *dev = filp->private_data;
324 int iobase = dev->p_dev->io.BasePort1; 323 int iobase = dev->p_dev->resource[0]->start;
325 ssize_t rc; 324 ssize_t rc;
326 int i; 325 int i;
327 unsigned int bytes_to_write; 326 unsigned int bytes_to_write;
@@ -528,16 +527,12 @@ static int cm4040_config_check(struct pcmcia_device *p_dev,
528 return -ENODEV; 527 return -ENODEV;
529 528
530 /* Get the IOaddr */ 529 /* Get the IOaddr */
531 p_dev->io.BasePort1 = cfg->io.win[0].base; 530 p_dev->resource[0]->start = cfg->io.win[0].base;
532 p_dev->io.NumPorts1 = cfg->io.win[0].len; 531 p_dev->resource[0]->end = cfg->io.win[0].len;
533 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 532 p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags);
534 if (!(cfg->io.flags & CISTPL_IO_8BIT)) 533 p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK;
535 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; 534 rc = pcmcia_request_io(p_dev);
536 if (!(cfg->io.flags & CISTPL_IO_16BIT)) 535
537 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
538 p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
539
540 rc = pcmcia_request_io(p_dev, &p_dev->io);
541 dev_printk(KERN_INFO, &p_dev->dev, 536 dev_printk(KERN_INFO, &p_dev->dev,
542 "pcmcia_request_io returned 0x%x\n", rc); 537 "pcmcia_request_io returned 0x%x\n", rc);
543 return rc; 538 return rc;
@@ -549,10 +544,6 @@ static int reader_config(struct pcmcia_device *link, int devno)
549 struct reader_dev *dev; 544 struct reader_dev *dev;
550 int fail_rc; 545 int fail_rc;
551 546
552 link->io.BasePort2 = 0;
553 link->io.NumPorts2 = 0;
554 link->io.Attributes2 = 0;
555
556 if (pcmcia_loop_config(link, cm4040_config_check, NULL)) 547 if (pcmcia_loop_config(link, cm4040_config_check, NULL))
557 goto cs_release; 548 goto cs_release;
558 549
@@ -568,8 +559,8 @@ static int reader_config(struct pcmcia_device *link, int devno)
568 559
569 dev = link->priv; 560 dev = link->priv;
570 561
571 DEBUGP(2, dev, "device " DEVICE_NAME "%d at 0x%.4x-0x%.4x\n", devno, 562 DEBUGP(2, dev, "device " DEVICE_NAME "%d at %pR\n", devno,
572 link->io.BasePort1, link->io.BasePort1+link->io.NumPorts1); 563 link->resource[0]);
573 DEBUGP(2, dev, "<- reader_config (succ)\n"); 564 DEBUGP(2, dev, "<- reader_config (succ)\n");
574 565
575 return 0; 566 return 0;
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 63c32e3f23ba..67bdb05798b1 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -84,23 +84,22 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
84{ 84{
85 struct ipw_dev *ipw = priv_data; 85 struct ipw_dev *ipw = priv_data;
86 struct resource *io_resource; 86 struct resource *io_resource;
87 memreq_t memreq_attr_memory;
88 memreq_t memreq_common_memory;
89 int ret; 87 int ret;
90 88
91 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 89 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
92 p_dev->io.BasePort1 = cfg->io.win[0].base; 90 p_dev->resource[0]->start = cfg->io.win[0].base;
93 p_dev->io.NumPorts1 = cfg->io.win[0].len; 91 p_dev->resource[0]->end = cfg->io.win[0].len;
94 p_dev->io.IOAddrLines = 16;
95 92
96 /* 0x40 causes it to generate level mode interrupts. */ 93 /* 0x40 causes it to generate level mode interrupts. */
97 /* 0x04 enables IREQ pin. */ 94 /* 0x04 enables IREQ pin. */
98 p_dev->conf.ConfigIndex = cfg->index | 0x44; 95 p_dev->conf.ConfigIndex = cfg->index | 0x44;
99 ret = pcmcia_request_io(p_dev, &p_dev->io); 96 p_dev->io_lines = 16;
97 ret = pcmcia_request_io(p_dev);
100 if (ret) 98 if (ret)
101 return ret; 99 return ret;
102 100
103 io_resource = request_region(p_dev->io.BasePort1, p_dev->io.NumPorts1, 101 io_resource = request_region(p_dev->resource[0]->start,
102 resource_size(p_dev->resource[0]),
104 IPWIRELESS_PCCARD_NAME); 103 IPWIRELESS_PCCARD_NAME);
105 104
106 if (cfg->mem.nwin == 0) 105 if (cfg->mem.nwin == 0)
@@ -120,11 +119,8 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
120 if (ret != 0) 119 if (ret != 0)
121 goto exit1; 120 goto exit1;
122 121
123 memreq_common_memory.CardOffset = cfg->mem.win[0].card_addr;
124 memreq_common_memory.Page = 0;
125
126 ret = pcmcia_map_mem_page(p_dev, ipw->handle_common_memory, 122 ret = pcmcia_map_mem_page(p_dev, ipw->handle_common_memory,
127 &memreq_common_memory); 123 cfg->mem.win[0].card_addr);
128 124
129 if (ret != 0) 125 if (ret != 0)
130 goto exit2; 126 goto exit2;
@@ -149,12 +145,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
149 if (ret != 0) 145 if (ret != 0)
150 goto exit2; 146 goto exit2;
151 147
152 memreq_attr_memory.CardOffset = 0; 148 ret = pcmcia_map_mem_page(p_dev, ipw->handle_attr_memory, 0);
153 memreq_attr_memory.Page = 0;
154
155 ret = pcmcia_map_mem_page(p_dev, ipw->handle_attr_memory,
156 &memreq_attr_memory);
157
158 if (ret != 0) 149 if (ret != 0)
159 goto exit3; 150 goto exit3;
160 151
@@ -166,15 +157,12 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
166 return 0; 157 return 0;
167 158
168exit3: 159exit3:
169 pcmcia_release_window(p_dev, ipw->handle_attr_memory);
170exit2: 160exit2:
171 if (ipw->common_memory) { 161 if (ipw->common_memory) {
172 release_mem_region(ipw->request_common_memory.Base, 162 release_mem_region(ipw->request_common_memory.Base,
173 ipw->request_common_memory.Size); 163 ipw->request_common_memory.Size);
174 iounmap(ipw->common_memory); 164 iounmap(ipw->common_memory);
175 pcmcia_release_window(p_dev, ipw->handle_common_memory); 165 }
176 } else
177 pcmcia_release_window(p_dev, ipw->handle_common_memory);
178exit1: 166exit1:
179 release_resource(io_resource); 167 release_resource(io_resource);
180 pcmcia_disable_device(p_dev); 168 pcmcia_disable_device(p_dev);
@@ -197,7 +185,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
197 185
198 INIT_WORK(&ipw->work_reboot, signalled_reboot_work); 186 INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
199 187
200 ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1, 188 ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start,
201 ipw->attr_memory, ipw->common_memory, 189 ipw->attr_memory, ipw->common_memory,
202 ipw->is_v2_card, signalled_reboot_callback, 190 ipw->is_v2_card, signalled_reboot_callback,
203 ipw); 191 ipw);
@@ -209,10 +197,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
209 printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n", 197 printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n",
210 ipw->is_v2_card ? "V2/V3" : "V1"); 198 ipw->is_v2_card ? "V2/V3" : "V1");
211 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 199 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
212 ": I/O ports 0x%04x-0x%04x, irq %d\n", 200 ": I/O ports %pR, irq %d\n", link->resource[0],
213 (unsigned int) link->io.BasePort1,
214 (unsigned int) (link->io.BasePort1 +
215 link->io.NumPorts1 - 1),
216 (unsigned int) link->irq); 201 (unsigned int) link->irq);
217 if (ipw->attr_memory && ipw->common_memory) 202 if (ipw->attr_memory && ipw->common_memory)
218 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 203 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
@@ -250,13 +235,12 @@ exit:
250 release_mem_region(ipw->request_attr_memory.Base, 235 release_mem_region(ipw->request_attr_memory.Base,
251 ipw->request_attr_memory.Size); 236 ipw->request_attr_memory.Size);
252 iounmap(ipw->attr_memory); 237 iounmap(ipw->attr_memory);
253 pcmcia_release_window(link, ipw->handle_attr_memory); 238
254 } 239 }
255 if (ipw->common_memory) { 240 if (ipw->common_memory) {
256 release_mem_region(ipw->request_common_memory.Base, 241 release_mem_region(ipw->request_common_memory.Base,
257 ipw->request_common_memory.Size); 242 ipw->request_common_memory.Size);
258 iounmap(ipw->common_memory); 243 iounmap(ipw->common_memory);
259 pcmcia_release_window(link, ipw->handle_common_memory);
260 } 244 }
261 pcmcia_disable_device(link); 245 pcmcia_disable_device(link);
262 return -1; 246 return -1;
@@ -274,11 +258,6 @@ static void release_ipwireless(struct ipw_dev *ipw)
274 ipw->request_attr_memory.Size); 258 ipw->request_attr_memory.Size);
275 iounmap(ipw->attr_memory); 259 iounmap(ipw->attr_memory);
276 } 260 }
277 if (ipw->common_memory)
278 pcmcia_release_window(ipw->link, ipw->handle_common_memory);
279 if (ipw->attr_memory)
280 pcmcia_release_window(ipw->link, ipw->handle_attr_memory);
281
282 pcmcia_disable_device(ipw->link); 261 pcmcia_disable_device(ipw->link);
283} 262}
284 263
diff --git a/drivers/char/pcmcia/ipwireless/main.h b/drivers/char/pcmcia/ipwireless/main.h
index 96d0ef31b172..c207be87b597 100644
--- a/drivers/char/pcmcia/ipwireless/main.h
+++ b/drivers/char/pcmcia/ipwireless/main.h
@@ -21,7 +21,6 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/types.h> 22#include <linux/types.h>
23 23
24#include <pcmcia/cs_types.h>
25#include <pcmcia/cs.h> 24#include <pcmcia/cs.h>
26#include <pcmcia/cistpl.h> 25#include <pcmcia/cistpl.h>
27#include <pcmcia/ds.h> 26#include <pcmcia/ds.h>
diff --git a/drivers/char/pcmcia/ipwireless/tty.h b/drivers/char/pcmcia/ipwireless/tty.h
index 4da6c201f727..3e163d4cab15 100644
--- a/drivers/char/pcmcia/ipwireless/tty.h
+++ b/drivers/char/pcmcia/ipwireless/tty.h
@@ -21,7 +21,6 @@
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/sched.h> 22#include <linux/sched.h>
23 23
24#include <pcmcia/cs_types.h>
25#include <pcmcia/cs.h> 24#include <pcmcia/cs.h>
26#include <pcmcia/cistpl.h> 25#include <pcmcia/cistpl.h>
27#include <pcmcia/ds.h> 26#include <pcmcia/ds.h>
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 308903ec8bf8..9ecd6bef5d3b 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -70,7 +70,6 @@
70#include <linux/workqueue.h> 70#include <linux/workqueue.h>
71#include <linux/hdlc.h> 71#include <linux/hdlc.h>
72 72
73#include <pcmcia/cs_types.h>
74#include <pcmcia/cs.h> 73#include <pcmcia/cs.h>
75#include <pcmcia/cistpl.h> 74#include <pcmcia/cistpl.h>
76#include <pcmcia/cisreg.h> 75#include <pcmcia/cisreg.h>
@@ -572,18 +571,15 @@ static int mgslpc_ioprobe(struct pcmcia_device *p_dev,
572 unsigned int vcc, 571 unsigned int vcc,
573 void *priv_data) 572 void *priv_data)
574{ 573{
575 if (cfg->io.nwin > 0) { 574 if (!cfg->io.nwin)
576 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 575 return -ENODEV;
577 if (!(cfg->io.flags & CISTPL_IO_8BIT)) 576
578 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; 577 p_dev->resource[0]->start = cfg->io.win[0].base;
579 if (!(cfg->io.flags & CISTPL_IO_16BIT)) 578 p_dev->resource[0]->end = cfg->io.win[0].len;
580 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 579 p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags);
581 p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; 580 p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK;
582 p_dev->io.BasePort1 = cfg->io.win[0].base; 581
583 p_dev->io.NumPorts1 = cfg->io.win[0].len; 582 return pcmcia_request_io(p_dev);
584 return pcmcia_request_io(p_dev, &p_dev->io);
585 }
586 return -ENODEV;
587} 583}
588 584
589static int mgslpc_config(struct pcmcia_device *link) 585static int mgslpc_config(struct pcmcia_device *link)
@@ -610,16 +606,15 @@ static int mgslpc_config(struct pcmcia_device *link)
610 if (ret) 606 if (ret)
611 goto failed; 607 goto failed;
612 608
613 info->io_base = link->io.BasePort1; 609 info->io_base = link->resource[0]->start;
614 info->irq_level = link->irq; 610 info->irq_level = link->irq;
615 611
616 dev_info(&link->dev, "index 0x%02x:", 612 dev_info(&link->dev, "index 0x%02x:",
617 link->conf.ConfigIndex); 613 link->conf.ConfigIndex);
618 if (link->conf.Attributes & CONF_ENABLE_IRQ) 614 if (link->conf.Attributes & CONF_ENABLE_IRQ)
619 printk(", irq %d", link->irq); 615 printk(", irq %d", link->irq);
620 if (link->io.NumPorts1) 616 if (link->resource[0])
621 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 617 printk(", io %pR", link->resource[0]);
622 link->io.BasePort1+link->io.NumPorts1-1);
623 printk("\n"); 618 printk("\n");
624 return 0; 619 return 0;
625 620