diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 18:32:31 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 18:32:31 -0400 |
commit | 8447d9d52adbe4c653482bd0d5ccb9b5d26f9c9d (patch) | |
tree | 358aa3ca6b0657623b84e7c6278f90fc95a32879 /drivers/ide/ppc | |
parent | fd9bb53942a7ca3398a63f2c238afd8fbed3ec0e (diff) |
ide: add ide_device_add()
* Add ide_device_add() helper and convert host drivers to use it
instead of open-coded variants.
* Make ide_pci_setup_ports() and do_ide_setup_pci_device()
take 'u8 *idx' argument instead of 'ata_index_t *index'.
* Remove no longer needed ata_index_t.
* Unexport probe_hwif_init() and make it static.
* Unexport ide_proc_register_port().
There should be no functionality changes caused by this patch
(sgiioc4.c: ide_proc_register_port() requires hwif->present
to be set and it won't be set if probe_hwif_init() fails).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index c55479356768..959afe47c374 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1039,6 +1039,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
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 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
1042 | 1043 | ||
1043 | pmif->cable_80 = 0; | 1044 | pmif->cable_80 = 0; |
1044 | pmif->broken_dma = pmif->broken_dma_warn = 0; | 1045 | pmif->broken_dma = pmif->broken_dma_warn = 0; |
@@ -1163,10 +1164,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1163 | pmac_ide_setup_dma(pmif, hwif); | 1164 | pmac_ide_setup_dma(pmif, hwif); |
1164 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 1165 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ |
1165 | 1166 | ||
1166 | /* We probe the hwif now */ | 1167 | idx[0] = hwif->index; |
1167 | probe_hwif_init(hwif); | ||
1168 | 1168 | ||
1169 | ide_proc_register_port(hwif); | 1169 | ide_device_add(idx); |
1170 | 1170 | ||
1171 | return 0; | 1171 | return 0; |
1172 | } | 1172 | } |