]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Can't disable IDE DMA
authorAndrew Morton <akpm@osdl.org>
Mon, 29 Dec 2003 13:47:35 +0000 (05:47 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 29 Dec 2003 13:47:35 +0000 (05:47 -0800)
From: Peter Chubb <peterc@gelato.unsw.edu.au>

If you try to disable IDE DMA from Kconfig, you'll end up with an undefined
symbol, ide_hwif_setup_dma().

The attached rather ugly patch fixes the problem by defining a dummy
function.

drivers/ide/setup-pci.c

index a1bf1ae9bfd5fbbda8bb313d4f81abebd419434d..e0ed9c0493f9f2a3038db18766a859a2a0c5c5b3 100644 (file)
@@ -474,6 +474,11 @@ fixup_address:
  *     state
  */
  
+#ifndef CONFIG_BLK_DEV_IDEDMA_PCI
+static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
+{
+}
+#else
 static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
 {
        u16 pcicmd;
@@ -516,6 +521,7 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
                }
        }
 }
+#endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/
 
 /**
  *     ide_setup_pci_controller        -       set up IDE PCI