]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ppc/pmac.c
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / drivers / ide / ppc / pmac.c
index 136911a86e84f67c3a0509a4b3bda6c8b5794029..78e30f80367129e34fa983fb97fd091acc8d6bf1 100644 (file)
@@ -1271,7 +1271,7 @@ static int
 pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
 {
        struct device_node *np = pmif->node;
-       int *bidp, i;
+       int *bidp;
 
        pmif->cable_80 = 0;
        pmif->broken_dma = pmif->broken_dma_warn = 0;
@@ -1401,20 +1401,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
        /* We probe the hwif now */
        probe_hwif_init(hwif);
 
-       /* The code IDE code will have set hwif->present if we have devices attached,
-        * if we don't, the discard the interface except if we are on a media bay slot
-        */
-       if (!hwif->present && !pmif->mediabay) {
-               printk(KERN_INFO "ide%d: Bus empty, interface released.\n",
-                       hwif->index);
-               default_hwif_iops(hwif);
-               for (i = IDE_DATA_OFFSET; i <= IDE_CONTROL_OFFSET; ++i)
-                       hwif->io_ports[i] = 0;
-               hwif->chipset = ide_unknown;
-               hwif->noprobe = 1;
-               return -ENODEV;
-       }
-
        return 0;
 }
 
@@ -1444,7 +1430,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        pmif = &pmac_ide[i];
        hwif = &ide_hwifs[i];
 
-       if (mdev->ofdev.node->n_addrs == 0) {
+       if (macio_resource_count(mdev) == 0) {
                printk(KERN_WARNING "ide%d: no address for %s\n",
                       i, mdev->ofdev.node->full_name);
                return -ENXIO;
@@ -1691,7 +1677,7 @@ MODULE_DEVICE_TABLE(pci, pmac_ide_pci_match);
 void __init
 pmac_ide_probe(void)
 {
-       if (_machine != _MACH_Pmac)
+       if (!machine_is(powermac))
                return;
 
 #ifdef CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST
@@ -1700,7 +1686,7 @@ pmac_ide_probe(void)
 #else
        macio_register_driver(&pmac_ide_macio_driver);
        pci_register_driver(&pmac_ide_pci_driver);
-#endif 
+#endif
 }
 
 #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC