aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c2
-rw-r--r--drivers/pnp/resource.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index e2a87fcfa6cf..ef3a2cd3a7a0 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -123,7 +123,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev,
123 } 123 }
124 124
125 flags = irq_flags(triggering, polarity, shareable); 125 flags = irq_flags(triggering, polarity, shareable);
126 irq = acpi_register_gsi(gsi, triggering, polarity); 126 irq = acpi_register_gsi(&dev->dev, gsi, triggering, polarity);
127 if (irq >= 0) 127 if (irq >= 0)
128 pcibios_penalize_isa_irq(irq, 1); 128 pcibios_penalize_isa_irq(irq, 1);
129 else 129 else
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index f604061d2bb0..ba9765427886 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -638,6 +638,24 @@ int pnp_possible_config(struct pnp_dev *dev, int type, resource_size_t start,
638} 638}
639EXPORT_SYMBOL(pnp_possible_config); 639EXPORT_SYMBOL(pnp_possible_config);
640 640
641int pnp_range_reserved(resource_size_t start, resource_size_t end)
642{
643 struct pnp_dev *dev;
644 struct pnp_resource *pnp_res;
645 resource_size_t *dev_start, *dev_end;
646
647 pnp_for_each_dev(dev) {
648 list_for_each_entry(pnp_res, &dev->resources, list) {
649 dev_start = &pnp_res->res.start;
650 dev_end = &pnp_res->res.end;
651 if (ranged_conflict(&start, &end, dev_start, dev_end))
652 return 1;
653 }
654 }
655 return 0;
656}
657EXPORT_SYMBOL(pnp_range_reserved);
658
641/* format is: pnp_reserve_irq=irq1[,irq2] .... */ 659/* format is: pnp_reserve_irq=irq1[,irq2] .... */
642static int __init pnp_setup_reserve_irq(char *str) 660static int __init pnp_setup_reserve_irq(char *str)
643{ 661{