diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 15:25:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 15:25:06 -0400 |
commit | 1685e633b396b0f3dabbc9fa5d65dfefe6435250 (patch) | |
tree | ee83e26e2468ca1518a1b065c690159e12c8def9 /drivers/parport | |
parent | 1cfd2bda8c486ae0e7a8005354758ebb68172bca (diff) | |
parent | 127c03cdbad9bd5af5d7f33bd31a1015a90cb77f (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/parport')
-rw-r--r-- | drivers/parport/parport_cs.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index fd8cfe95f0a3..23e50f4a27c5 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/parport.h> | 48 | #include <linux/parport.h> |
49 | #include <linux/parport_pc.h> | 49 | #include <linux/parport_pc.h> |
50 | 50 | ||
51 | #include <pcmcia/cs_types.h> | ||
52 | #include <pcmcia/cs.h> | 51 | #include <pcmcia/cs.h> |
53 | #include <pcmcia/cistpl.h> | 52 | #include <pcmcia/cistpl.h> |
54 | #include <pcmcia/ds.h> | 53 | #include <pcmcia/ds.h> |
@@ -102,8 +101,8 @@ static int parport_probe(struct pcmcia_device *link) | |||
102 | link->priv = info; | 101 | link->priv = info; |
103 | info->p_dev = link; | 102 | info->p_dev = link; |
104 | 103 | ||
105 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 104 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
106 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 105 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; |
107 | link->conf.Attributes = CONF_ENABLE_IRQ; | 106 | link->conf.Attributes = CONF_ENABLE_IRQ; |
108 | link->conf.IntType = INT_MEMORY_AND_IO; | 107 | link->conf.IntType = INT_MEMORY_AND_IO; |
109 | 108 | ||
@@ -144,16 +143,16 @@ static int parport_config_check(struct pcmcia_device *p_dev, | |||
144 | { | 143 | { |
145 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 144 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
146 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 145 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
146 | p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; | ||
147 | if (epp_mode) | 147 | if (epp_mode) |
148 | p_dev->conf.ConfigIndex |= FORCE_EPP_MODE; | 148 | p_dev->conf.ConfigIndex |= FORCE_EPP_MODE; |
149 | p_dev->io.BasePort1 = io->win[0].base; | 149 | p_dev->resource[0]->start = io->win[0].base; |
150 | p_dev->io.NumPorts1 = io->win[0].len; | 150 | p_dev->resource[0]->end = io->win[0].len; |
151 | p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; | ||
152 | if (io->nwin == 2) { | 151 | if (io->nwin == 2) { |
153 | p_dev->io.BasePort2 = io->win[1].base; | 152 | p_dev->resource[1]->start = io->win[1].base; |
154 | p_dev->io.NumPorts2 = io->win[1].len; | 153 | p_dev->resource[1]->end = io->win[1].len; |
155 | } | 154 | } |
156 | if (pcmcia_request_io(p_dev, &p_dev->io) != 0) | 155 | if (pcmcia_request_io(p_dev) != 0) |
157 | return -ENODEV; | 156 | return -ENODEV; |
158 | return 0; | 157 | return 0; |
159 | } | 158 | } |
@@ -178,12 +177,14 @@ static int parport_config(struct pcmcia_device *link) | |||
178 | if (ret) | 177 | if (ret) |
179 | goto failed; | 178 | goto failed; |
180 | 179 | ||
181 | p = parport_pc_probe_port(link->io.BasePort1, link->io.BasePort2, | 180 | p = parport_pc_probe_port(link->resource[0]->start, |
181 | link->resource[1]->start, | ||
182 | link->irq, PARPORT_DMA_NONE, | 182 | link->irq, PARPORT_DMA_NONE, |
183 | &link->dev, IRQF_SHARED); | 183 | &link->dev, IRQF_SHARED); |
184 | if (p == NULL) { | 184 | if (p == NULL) { |
185 | printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at " | 185 | printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at " |
186 | "0x%3x, irq %u failed\n", link->io.BasePort1, | 186 | "0x%3x, irq %u failed\n", |
187 | (unsigned int) link->resource[0]->start, | ||
187 | link->irq); | 188 | link->irq); |
188 | goto failed; | 189 | goto failed; |
189 | } | 190 | } |