From: Bartlomiej Zolnierkiewicz Date: Sat, 26 Jan 2008 19:13:08 +0000 (+0100) Subject: ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled X-Git-Tag: v2.6.25-rc1~1227^2~25 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4f52a32994f9e05fb8ae1a9ba3f20cd0b55145b7;p=linux-2.6-omap-h63xx.git ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled Move setting hwif->sg_max_nents from pmac_ide_setup_device() to pmac_ide_setup_dma(). Acked-by: Benjamin Herrenschmidt Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index cd514743df9..736d12c8e68 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -1133,8 +1133,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) hwif->noprobe = 0; #endif /* CONFIG_PMAC_MEDIABAY */ - hwif->sg_max_nents = MAX_DCMDS; - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC /* has a DBDMA controller channel */ if (pmif->dma_regs) @@ -1751,6 +1749,8 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) return; } + hwif->sg_max_nents = MAX_DCMDS; + hwif->dma_host_set = &pmac_ide_dma_host_set; hwif->dma_setup = &pmac_ide_dma_setup; hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd;