diff options
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index ee557d10a764..ecd2f28da1ba 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1039,9 +1039,9 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) | |||
1039 | { | 1039 | { |
1040 | struct device_node *np = pmif->node; | 1040 | struct device_node *np = pmif->node; |
1041 | const int *bidp; | 1041 | const int *bidp; |
1042 | struct ide_host *host; | ||
1042 | ide_hwif_t *hwif; | 1043 | ide_hwif_t *hwif; |
1043 | hw_regs_t *hws[] = { hw, NULL, NULL, NULL }; | 1044 | hw_regs_t *hws[] = { hw, NULL, NULL, NULL }; |
1044 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
1045 | struct ide_port_info d = pmac_port_info; | 1045 | struct ide_port_info d = pmac_port_info; |
1046 | 1046 | ||
1047 | pmif->broken_dma = pmif->broken_dma_warn = 0; | 1047 | pmif->broken_dma = pmif->broken_dma_warn = 0; |
@@ -1118,13 +1118,13 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) | |||
1118 | pmif->mdev ? "macio" : "PCI", pmif->aapl_bus_id, | 1118 | pmif->mdev ? "macio" : "PCI", pmif->aapl_bus_id, |
1119 | pmif->mediabay ? " (mediabay)" : "", hw->irq); | 1119 | pmif->mediabay ? " (mediabay)" : "", hw->irq); |
1120 | 1120 | ||
1121 | hwif = ide_find_port_slot(&d); | 1121 | host = ide_host_alloc(&d, hws); |
1122 | if (hwif == NULL) | 1122 | if (host == NULL) |
1123 | return -ENOENT; | 1123 | return -ENOENT; |
1124 | 1124 | ||
1125 | idx[0] = hwif->index; | 1125 | ide_host_register(host, &d, hws); |
1126 | 1126 | ||
1127 | ide_device_add(idx, &d, hws); | 1127 | hwif = host->ports[0]; |
1128 | 1128 | ||
1129 | return 0; | 1129 | return 0; |
1130 | } | 1130 | } |