From 9c8b55a99e9e9ecfb98d674adabfe2c375cf3c61 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 25 Jul 2003 00:46:30 -0700 Subject: [PATCH] [PATCH] ide: fix PCI modules oops 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 45a989dd55ad2..447e843de3816 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -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; -- 2.53.0