Commit 6ebe5a01 authored by David S. Miller's avatar David S. Miller

[AIC79XX]: Protect ahd_linux_pci_reserve_mem_region with MMAPIO.

parent 189ea5d0
...@@ -52,9 +52,11 @@ static int ahd_linux_pci_dev_probe(struct pci_dev *pdev, ...@@ -52,9 +52,11 @@ static int ahd_linux_pci_dev_probe(struct pci_dev *pdev,
const struct pci_device_id *ent); const struct pci_device_id *ent);
static int ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, static int ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd,
u_long *base, u_long *base2); u_long *base, u_long *base2);
#ifdef MMAPIO
static int ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, static int ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
u_long *bus_addr, u_long *bus_addr,
uint8_t **maddr); uint8_t **maddr);
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
static void ahd_linux_pci_dev_remove(struct pci_dev *pdev); static void ahd_linux_pci_dev_remove(struct pci_dev *pdev);
...@@ -271,6 +273,7 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base, ...@@ -271,6 +273,7 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base,
return (0); return (0);
} }
#ifdef MMAPIO
static int static int
ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
u_long *bus_addr, u_long *bus_addr,
...@@ -318,6 +321,7 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, ...@@ -318,6 +321,7 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
error = ENOMEM; error = ENOMEM;
return (error); return (error);
} }
#endif
int int
ahd_pci_map_registers(struct ahd_softc *ahd) ahd_pci_map_registers(struct ahd_softc *ahd)
......
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