aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cmd64x.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-24 23:22:49 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:17 -0400
commit1bd5b715a305f6f13455e89becbd839010dd14b5 (patch)
tree22e74b38495c51cda92145b7ae31f504f80d9fd3 /drivers/ata/pata_cmd64x.c
parent029cfd6b74fc5c517865fad78cf4a3ea8d9b664a (diff)
libata: make ata_pci_init_one() not use ops->irq_handler and pi->sht
ata_pci_init_one() is the only function which uses ops->irq_handler and pi->sht. Other initialization functions take the same information as arguments. This causes confusion and duplicate unused entries in structures. Make ata_pci_init_one() take sht as an argument and use ata_interrupt implicitly. All current users use ata_interrupt and if different irq handler is necessary open coding ata_pci_init_one() using ata_prepare_sff_host() and ata_activate_sff_host can be done under ten lines including error handling and driver which requires custom interrupt handler is likely to require custom initialization anyway. As ata_pci_init_one() was the last user of ops->irq_handler, this patch also kills the field. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/pata_cmd64x.c')
-rw-r--r--drivers/ata/pata_cmd64x.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 1ac8ecfb97e2..bfd72ef9cd31 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -298,21 +298,18 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
298 298
299 static const struct ata_port_info cmd_info[6] = { 299 static const struct ata_port_info cmd_info[6] = {
300 { /* CMD 643 - no UDMA */ 300 { /* CMD 643 - no UDMA */
301 .sht = &cmd64x_sht,
302 .flags = ATA_FLAG_SLAVE_POSS, 301 .flags = ATA_FLAG_SLAVE_POSS,
303 .pio_mask = 0x1f, 302 .pio_mask = 0x1f,
304 .mwdma_mask = 0x07, 303 .mwdma_mask = 0x07,
305 .port_ops = &cmd64x_port_ops 304 .port_ops = &cmd64x_port_ops
306 }, 305 },
307 { /* CMD 646 with broken UDMA */ 306 { /* CMD 646 with broken UDMA */
308 .sht = &cmd64x_sht,
309 .flags = ATA_FLAG_SLAVE_POSS, 307 .flags = ATA_FLAG_SLAVE_POSS,
310 .pio_mask = 0x1f, 308 .pio_mask = 0x1f,
311 .mwdma_mask = 0x07, 309 .mwdma_mask = 0x07,
312 .port_ops = &cmd64x_port_ops 310 .port_ops = &cmd64x_port_ops
313 }, 311 },
314 { /* CMD 646 with working UDMA */ 312 { /* CMD 646 with working UDMA */
315 .sht = &cmd64x_sht,
316 .flags = ATA_FLAG_SLAVE_POSS, 313 .flags = ATA_FLAG_SLAVE_POSS,
317 .pio_mask = 0x1f, 314 .pio_mask = 0x1f,
318 .mwdma_mask = 0x07, 315 .mwdma_mask = 0x07,
@@ -320,14 +317,12 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
320 .port_ops = &cmd64x_port_ops 317 .port_ops = &cmd64x_port_ops
321 }, 318 },
322 { /* CMD 646 rev 1 */ 319 { /* CMD 646 rev 1 */
323 .sht = &cmd64x_sht,
324 .flags = ATA_FLAG_SLAVE_POSS, 320 .flags = ATA_FLAG_SLAVE_POSS,
325 .pio_mask = 0x1f, 321 .pio_mask = 0x1f,
326 .mwdma_mask = 0x07, 322 .mwdma_mask = 0x07,
327 .port_ops = &cmd646r1_port_ops 323 .port_ops = &cmd646r1_port_ops
328 }, 324 },
329 { /* CMD 648 */ 325 { /* CMD 648 */
330 .sht = &cmd64x_sht,
331 .flags = ATA_FLAG_SLAVE_POSS, 326 .flags = ATA_FLAG_SLAVE_POSS,
332 .pio_mask = 0x1f, 327 .pio_mask = 0x1f,
333 .mwdma_mask = 0x07, 328 .mwdma_mask = 0x07,
@@ -335,7 +330,6 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
335 .port_ops = &cmd648_port_ops 330 .port_ops = &cmd648_port_ops
336 }, 331 },
337 { /* CMD 649 */ 332 { /* CMD 649 */
338 .sht = &cmd64x_sht,
339 .flags = ATA_FLAG_SLAVE_POSS, 333 .flags = ATA_FLAG_SLAVE_POSS,
340 .pio_mask = 0x1f, 334 .pio_mask = 0x1f,
341 .mwdma_mask = 0x07, 335 .mwdma_mask = 0x07,
@@ -379,7 +373,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
379 pci_write_config_byte(pdev, UDIDETCR0, 0xF0); 373 pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
380#endif 374#endif
381 375
382 return ata_pci_init_one(pdev, ppi); 376 return ata_pci_init_one(pdev, ppi, &cmd64x_sht);
383} 377}
384 378
385#ifdef CONFIG_PM 379#ifdef CONFIG_PM