]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ide: fix PCI modules oops
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Fri, 25 Jul 2003 07:46:30 +0000 (00:46 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 25 Jul 2003 07:46:30 +0000 (00:46 -0700)
Forward-port of 2.4.21-ac4 patch by Wilfried Weissmann.

ide_get_or_set_dma_base() may be called via ide_setup_pci_device()
when a PCI controller module is loaded.  However, it is defined with __init
and the function is called when its memory is already deallocated.

drivers/ide/setup-pci.c

index 45a989dd55ad2bb4eab7963b19fa0c5e301eda06..447e843de3816aeff2059662ff4ee967512f4e18 100644 (file)
@@ -172,7 +172,7 @@ static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name)
  *     is already in DMA mode we check and enforce IDE simplex rules.
  */
 
-static unsigned long __init ide_get_or_set_dma_base (ide_hwif_t *hwif)
+static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif)
 {
        unsigned long   dma_base = 0;
        struct pci_dev  *dev = hwif->pci_dev;