diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:21 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:21 -0400 |
commit | b8e73fba60414e161d8fd2429b6fb268e34502e2 (patch) | |
tree | f426376c826ff1a8979a36eb6b5bde1addb7d719 /drivers/ide/pci/trm290.c | |
parent | 23658f8af3dbba53ae9796e4c37c2fdd0272662e (diff) |
ide: export ide_allocate_dma_engine()
Export ide_allocate_dma_engine() and use it in trm290 host driver.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/trm290.c')
-rw-r--r-- | drivers/ide/pci/trm290.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 0677ab016ef8..7e354d33323b 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -254,16 +254,11 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | |||
254 | hwif->config_data = cfg_base; | 254 | hwif->config_data = cfg_base; |
255 | hwif->dma_base = (cfg_base + 4) ^ (hwif->channel ? 0x80 : 0); | 255 | hwif->dma_base = (cfg_base + 4) ^ (hwif->channel ? 0x80 : 0); |
256 | 256 | ||
257 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx", | 257 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", |
258 | hwif->name, hwif->dma_base, hwif->dma_base + 3); | 258 | hwif->name, hwif->dma_base, hwif->dma_base + 3); |
259 | 259 | ||
260 | hwif->dmatable_cpu = pci_alloc_consistent(dev, PRD_ENTRIES * PRD_BYTES, | 260 | if (ide_allocate_dma_engine(hwif)) |
261 | &hwif->dmatable_dma); | ||
262 | if (!hwif->dmatable_cpu) { | ||
263 | printk(KERN_CONT " -- Error, unable to allocate DMA table.\n"); | ||
264 | return; | 261 | return; |
265 | } | ||
266 | printk(KERN_CONT "\n"); | ||
267 | 262 | ||
268 | local_irq_save(flags); | 263 | local_irq_save(flags); |
269 | /* put config reg into first byte of hwif->select_data */ | 264 | /* put config reg into first byte of hwif->select_data */ |