Pull Kconfig into release branch
[pandora-kernel.git] / drivers / ide / ppc / pmac.c
index 136911a..ffca8b6 100644 (file)
@@ -553,6 +553,8 @@ pmac_ide_init_hwif_ports(hw_regs_t *hw,
 
        if (irq != NULL)
                *irq = pmac_ide[ix].irq;
+
+       hw->dev = &pmac_ide[ix].mdev->ofdev.dev;
 }
 
 #define PMAC_IDE_REG(x) ((void __iomem *)(IDE_DATA_REG+(x)))
@@ -1271,7 +1273,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 +1403,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 +1432,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 +1679,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 +1688,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