Merge branches 'acpi-sysfs', 'acpi-pci' and 'acpi-tables'
* acpi-sysfs: ACPI / sysfs: Update sysfs signature handling code ACPI / sysfs: Fix an issue for LoadTable opcode ACPI / sysfs: Use new GPE masking mechanism in GPE interface * acpi-pci: ACPI / platform: Pay attention to parent device's resources PCI: Add pci_find_resource() ACPI / PCI: fix GIC irq model default PCI IRQ polarity * acpi-tables: ACPI / tables: Remove duplicated include from tables.c ACPI / tables: do not report the number of entries ignored by acpi_parse_entries() ACPI / tables: fix acpi_parse_entries_array() so it traverses all subtables ACPI / tables: fix incorrect counts returned by acpi_parse_entries_array()
This commit is contained in:
@@ -479,6 +479,30 @@ struct resource *pci_find_parent_resource(const struct pci_dev *dev,
|
||||
}
|
||||
EXPORT_SYMBOL(pci_find_parent_resource);
|
||||
|
||||
/**
|
||||
* pci_find_resource - Return matching PCI device resource
|
||||
* @dev: PCI device to query
|
||||
* @res: Resource to look for
|
||||
*
|
||||
* Goes over standard PCI resources (BARs) and checks if the given resource
|
||||
* is partially or fully contained in any of them. In that case the
|
||||
* matching resource is returned, %NULL otherwise.
|
||||
*/
|
||||
struct resource *pci_find_resource(struct pci_dev *dev, struct resource *res)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PCI_ROM_RESOURCE; i++) {
|
||||
struct resource *r = &dev->resource[i];
|
||||
|
||||
if (r->start && resource_contains(r, res))
|
||||
return r;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(pci_find_resource);
|
||||
|
||||
/**
|
||||
* pci_find_pcie_root_port - return PCIe Root Port
|
||||
* @dev: PCI device to query
|
||||
|
Reference in New Issue
Block a user