diff options
author | Tejun Heo <htejun@gmail.com> | 2007-04-17 10:44:08 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 14:16:06 -0400 |
commit | 5d728824efeda61d304153bfcf1378a3c18b7d70 (patch) | |
tree | 8a3d4ba0c1c650da5c161f11155e7c19f0fe78aa /drivers/ata/pata_pcmcia.c | |
parent | 4447d35156169cf136e829eb6b5cac2d6370f2d9 (diff) |
libata: convert the remaining PATA drivers to new init model
Convert pdc_adma, pata_cs5520, pata_isapnp, pata_ixp4xx_cf,
pata_legacy, pata_mpc52xx, pata_mpiix, pata_pcmcia, pata_pdc2027x,
pata_platform, pata_qdi, pata_scc and pata_winbond to new init model.
* init_one()'s now follow more consistent init order
* cs5520 now registers one host with two ports, not two hosts. If any
of the two ports are disabled, it's made dummy as other drivers do.
Tested pdc_adma and pata_legacy. Both are as broken as before. The
rest are compile tested only.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_pcmcia.c')
-rw-r--r-- | drivers/ata/pata_pcmcia.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 171da0aeb65..75dc84797ff 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -125,7 +125,6 @@ static struct ata_port_operations pcmcia_port_ops = { | |||
125 | 125 | ||
126 | .data_xfer = ata_data_xfer_noirq, | 126 | .data_xfer = ata_data_xfer_noirq, |
127 | 127 | ||
128 | .irq_handler = ata_interrupt, | ||
129 | .irq_clear = ata_bmdma_irq_clear, | 128 | .irq_clear = ata_bmdma_irq_clear, |
130 | .irq_on = ata_irq_on, | 129 | .irq_on = ata_irq_on, |
131 | .irq_ack = ata_irq_ack, | 130 | .irq_ack = ata_irq_ack, |
@@ -146,7 +145,8 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
146 | 145 | ||
147 | static int pcmcia_init_one(struct pcmcia_device *pdev) | 146 | static int pcmcia_init_one(struct pcmcia_device *pdev) |
148 | { | 147 | { |
149 | struct ata_probe_ent ae; | 148 | struct ata_host *host; |
149 | struct ata_port *ap; | ||
150 | struct ata_pcmcia_info *info; | 150 | struct ata_pcmcia_info *info; |
151 | tuple_t tuple; | 151 | tuple_t tuple; |
152 | struct { | 152 | struct { |
@@ -290,24 +290,24 @@ next_entry: | |||
290 | * Having done the PCMCIA plumbing the ATA side is relatively | 290 | * Having done the PCMCIA plumbing the ATA side is relatively |
291 | * sane. | 291 | * sane. |
292 | */ | 292 | */ |
293 | 293 | ret = -ENOMEM; | |
294 | memset(&ae, 0, sizeof(struct ata_probe_ent)); | 294 | host = ata_host_alloc(&pdev->dev, 1); |
295 | INIT_LIST_HEAD(&ae.node); | 295 | if (!host) |
296 | ae.dev = &pdev->dev; | 296 | goto failed; |
297 | ae.port_ops = &pcmcia_port_ops; | 297 | ap = host->ports[0]; |
298 | ae.sht = &pcmcia_sht; | 298 | |
299 | ae.n_ports = 1; | 299 | ap->ops = &pcmcia_port_ops; |
300 | ae.pio_mask = 1; /* ISA so PIO 0 cycles */ | 300 | ap->pio_mask = 1; /* ISA so PIO 0 cycles */ |
301 | ae.irq = pdev->irq.AssignedIRQ; | 301 | ap->flags |= ATA_FLAG_SLAVE_POSS; |
302 | ae.irq_flags = IRQF_SHARED; | 302 | ap->ioaddr.cmd_addr = io_addr; |
303 | ae.port_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST; | 303 | ap->ioaddr.altstatus_addr = ctl_addr; |
304 | ae.port[0].cmd_addr = io_addr; | 304 | ap->ioaddr.ctl_addr = ctl_addr; |
305 | ae.port[0].altstatus_addr = ctl_addr; | 305 | ata_std_ports(&ap->ioaddr); |
306 | ae.port[0].ctl_addr = ctl_addr; | 306 | |
307 | ata_std_ports(&ae.port[0]); | 307 | /* activate */ |
308 | 308 | ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_interrupt, | |
309 | ret = -ENODEV; | 309 | IRQF_SHARED, &pcmcia_sht); |
310 | if (ata_device_add(&ae) == 0) | 310 | if (ret) |
311 | goto failed; | 311 | goto failed; |
312 | 312 | ||
313 | info->ndev = 1; | 313 | info->ndev = 1; |