aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_artop.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_artop.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_artop.c')
-rw-r--r--drivers/ata/pata_artop.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 0101e5aef3e0..698a53c96111 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -352,7 +352,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
352{ 352{
353 static int printed_version; 353 static int printed_version;
354 static const struct ata_port_info info_6210 = { 354 static const struct ata_port_info info_6210 = {
355 .sht = &artop_sht,
356 .flags = ATA_FLAG_SLAVE_POSS, 355 .flags = ATA_FLAG_SLAVE_POSS,
357 .pio_mask = 0x1f, /* pio0-4 */ 356 .pio_mask = 0x1f, /* pio0-4 */
358 .mwdma_mask = 0x07, /* mwdma0-2 */ 357 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -360,7 +359,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
360 .port_ops = &artop6210_ops, 359 .port_ops = &artop6210_ops,
361 }; 360 };
362 static const struct ata_port_info info_626x = { 361 static const struct ata_port_info info_626x = {
363 .sht = &artop_sht,
364 .flags = ATA_FLAG_SLAVE_POSS, 362 .flags = ATA_FLAG_SLAVE_POSS,
365 .pio_mask = 0x1f, /* pio0-4 */ 363 .pio_mask = 0x1f, /* pio0-4 */
366 .mwdma_mask = 0x07, /* mwdma0-2 */ 364 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -368,7 +366,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
368 .port_ops = &artop6260_ops, 366 .port_ops = &artop6260_ops,
369 }; 367 };
370 static const struct ata_port_info info_628x = { 368 static const struct ata_port_info info_628x = {
371 .sht = &artop_sht,
372 .flags = ATA_FLAG_SLAVE_POSS, 369 .flags = ATA_FLAG_SLAVE_POSS,
373 .pio_mask = 0x1f, /* pio0-4 */ 370 .pio_mask = 0x1f, /* pio0-4 */
374 .mwdma_mask = 0x07, /* mwdma0-2 */ 371 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -376,7 +373,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
376 .port_ops = &artop6260_ops, 373 .port_ops = &artop6260_ops,
377 }; 374 };
378 static const struct ata_port_info info_628x_fast = { 375 static const struct ata_port_info info_628x_fast = {
379 .sht = &artop_sht,
380 .flags = ATA_FLAG_SLAVE_POSS, 376 .flags = ATA_FLAG_SLAVE_POSS,
381 .pio_mask = 0x1f, /* pio0-4 */ 377 .pio_mask = 0x1f, /* pio0-4 */
382 .mwdma_mask = 0x07, /* mwdma0-2 */ 378 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -434,7 +430,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
434 430
435 BUG_ON(ppi[0] == NULL); 431 BUG_ON(ppi[0] == NULL);
436 432
437 return ata_pci_init_one(pdev, ppi); 433 return ata_pci_init_one(pdev, ppi, &artop_sht);
438} 434}
439 435
440static const struct pci_device_id artop_pci_tbl[] = { 436static const struct pci_device_id artop_pci_tbl[] = {