X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fpnp%2Fresource.c;h=2d1322dd7e1961bebfd0d4911523b6016648a7d9;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=3fc9f6c6fddb1d5ae2c7285632377160877b951b;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 3fc9f6c6f..2d1322dd7 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c @@ -21,11 +21,10 @@ #include #include "base.h" -int pnp_skip_pci_scan; /* skip PCI resource scanning */ -int pnp_reserve_irq[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some IRQ */ -int pnp_reserve_dma[8] = { [0 ... 7] = -1 }; /* reserve (don't use) some DMA */ -int pnp_reserve_io[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some I/O region */ -int pnp_reserve_mem[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some memory region */ +static int pnp_reserve_irq[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some IRQ */ +static int pnp_reserve_dma[8] = { [0 ... 7] = -1 }; /* reserve (don't use) some DMA */ +static int pnp_reserve_io[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some I/O region */ +static int pnp_reserve_mem[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some memory region */ /* @@ -101,8 +100,8 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) { int i; - for (i=0; i<16; i++) - if (data->map & (1<map)) pcibios_penalize_isa_irq(i); } #endif @@ -385,9 +384,9 @@ int pnp_check_irq(struct pnp_dev * dev, int idx) #ifdef CONFIG_PCI /* check if the resource is being used by a pci device */ - if (!pnp_skip_pci_scan) { - struct pci_dev * pci = NULL; - while ((pci = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci)) != NULL) { + { + struct pci_dev *pci = NULL; + for_each_pci_dev(pci) { if (pci->irq == *irq) return 0; } @@ -421,6 +420,7 @@ int pnp_check_irq(struct pnp_dev * dev, int idx) int pnp_check_dma(struct pnp_dev * dev, int idx) { +#ifndef CONFIG_IA64 int tmp; struct pnp_dev *tdev; unsigned long * dma = &dev->res.dma_resource[idx].start; @@ -470,6 +470,10 @@ int pnp_check_dma(struct pnp_dev * dev, int idx) } return 1; +#else + /* IA64 hasn't legacy DMA */ + return 0; +#endif }