Pull Kconfig into release branch
[pandora-kernel.git] / drivers / ide / ppc / pmac.c
index 16b2835..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;
@@ -1430,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;
@@ -1677,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
@@ -1686,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