aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:24 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:24 -0500
commit7b77d864af29c193f6cee8338dbda40accb9b27b (patch)
tree920f8605b26f11d520264bb8ab6faf2bffc1d162 /drivers/ide
parentc1607e1af238b823a2158a18ff6c89144ce38c6c (diff)
ide: remove ide_pci_device_t tables with only one entry
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/cy82c693.c21
-rw-r--r--drivers/ide/pci/sgiioc4.c7
2 files changed, 11 insertions, 17 deletions
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 9eafcbf444f4..603a7bebf117 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -478,21 +478,18 @@ static void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
478 } 478 }
479} 479}
480 480
481static ide_pci_device_t cy82c693_chipsets[] __devinitdata = { 481static ide_pci_device_t cy82c693_chipset __devinitdata = {
482 { /* 0 */ 482 .name = "CY82C693",
483 .name = "CY82C693", 483 .init_chipset = init_chipset_cy82c693,
484 .init_chipset = init_chipset_cy82c693, 484 .init_iops = init_iops_cy82c693,
485 .init_iops = init_iops_cy82c693, 485 .init_hwif = init_hwif_cy82c693,
486 .init_hwif = init_hwif_cy82c693, 486 .channels = 1,
487 .channels = 1, 487 .autodma = AUTODMA,
488 .autodma = AUTODMA, 488 .bootable = ON_BOARD,
489 .bootable = ON_BOARD,
490 }
491}; 489};
492 490
493static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id) 491static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
494{ 492{
495 ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
496 struct pci_dev *dev2; 493 struct pci_dev *dev2;
497 int ret = -ENODEV; 494 int ret = -ENODEV;
498 495
@@ -501,7 +498,7 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev
501 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && 498 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
502 PCI_FUNC(dev->devfn) == 1) { 499 PCI_FUNC(dev->devfn) == 1) {
503 dev2 = pci_get_slot(dev->bus, dev->devfn + 1); 500 dev2 = pci_get_slot(dev->bus, dev->devfn + 1);
504 ret = ide_setup_pci_devices(dev, dev2, d); 501 ret = ide_setup_pci_devices(dev, dev2, &cy82c693_chipset);
505 /* We leak pci refs here but thats ok - we can't be unloaded */ 502 /* We leak pci refs here but thats ok - we can't be unloaded */
506 } 503 }
507 return ret; 504 return ret;
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index b0bf01809279..81d44ed37f34 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -729,8 +729,7 @@ out:
729 return ret; 729 return ret;
730} 730}
731 731
732static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = { 732static ide_pci_device_t sgiioc4_chipset __devinitdata = {
733 {
734 /* Channel 0 */ 733 /* Channel 0 */
735 .name = "SGIIOC4", 734 .name = "SGIIOC4",
736 .init_hwif = ide_init_sgiioc4, 735 .init_hwif = ide_init_sgiioc4,
@@ -739,7 +738,6 @@ static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = {
739 .autodma = AUTODMA, 738 .autodma = AUTODMA,
740 /* SGI IOC4 doesn't have enablebits. */ 739 /* SGI IOC4 doesn't have enablebits. */
741 .bootable = ON_BOARD, 740 .bootable = ON_BOARD,
742 }
743}; 741};
744 742
745int 743int
@@ -751,8 +749,7 @@ ioc4_ide_attach_one(struct ioc4_driver_data *idd)
751 if (idd->idd_variant == IOC4_VARIANT_PCI_RT) 749 if (idd->idd_variant == IOC4_VARIANT_PCI_RT)
752 return 0; 750 return 0;
753 751
754 return pci_init_sgiioc4(idd->idd_pdev, 752 return pci_init_sgiioc4(idd->idd_pdev, &sgiioc4_chipset);
755 &sgiioc4_chipsets[idd->idd_pci_id->driver_data]);
756} 753}
757 754
758static struct ioc4_submodule ioc4_ide_submodule = { 755static struct ioc4_submodule ioc4_ide_submodule = {