aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/parport_cs.c23
-rw-r--r--drivers/parport/parport_serial.c1
2 files changed, 12 insertions, 12 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 }
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 40e208d130f5..f01e26440f11 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -342,7 +342,6 @@ static int __devinit parport_register (struct pci_dev *dev,
342 dev_dbg(&dev->dev, 342 dev_dbg(&dev->dev,
343 "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n", 343 "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n",
344 io_lo, io_hi, irq); 344 io_lo, io_hi, irq);
345 irq = PARPORT_IRQ_NONE;
346 } 345 }
347 port = parport_pc_probe_port (io_lo, io_hi, irq, 346 port = parport_pc_probe_port (io_lo, io_hi, irq,
348 PARPORT_DMA_NONE, &dev->dev, IRQF_SHARED); 347 PARPORT_DMA_NONE, &dev->dev, IRQF_SHARED);