Commit 9c8b55a9 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[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.
parent ccdba6ab
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment