diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-10 10:05:16 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-10 10:05:16 -0500 |
commit | 8fbcf5ecb336eb6da560f08d60e95b51d318795c (patch) | |
tree | 77a1b947838d60edd0e81d37327985de2e842b68 /drivers/pci/bus.c | |
parent | d23209680291dad6c79f1a6f187697c3884d554d (diff) | |
parent | 5c493df25a0d9e0c3bda742250ecfc5953bf4ccd (diff) |
Merge branch 'acpi-resources'
* acpi-resources: (23 commits)
Merge branch 'pci/host-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci into acpi-resources
x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug
ACPI: Add interfaces to parse IOAPIC ID for IOAPIC hotplug
x86/PCI: Refine the way to release PCI IRQ resources
x86/PCI/ACPI: Use common ACPI resource interfaces to simplify implementation
x86/PCI: Fix the range check for IO resources
PCI: Use common resource list management code instead of private implementation
resources: Move struct resource_list_entry from ACPI into resource core
ACPI: Introduce helper function acpi_dev_filter_resource_type()
ACPI: Add field offset to struct resource_list_entry
ACPI: Translate resource into master side address for bridge window resources
ACPI: Return translation offset when parsing ACPI address space resources
ACPI: Enforce stricter checks for address space descriptors
ACPI: Set flag IORESOURCE_UNSET for unassigned resources
ACPI: Normalize return value of resource parser functions
ACPI: Fix a bug in parsing ACPI Memory24 resource
ACPI: Add prefetch decoding to the address space parser
ACPI: Move the window flag logic to the combined parser
ACPI: Unify the parsing of address_space and ext_address_space
ACPI: Let the parser return false for disabled resources
...
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 8fb16188cd82..90fa3a78fb7c 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -20,17 +20,16 @@ | |||
20 | void pci_add_resource_offset(struct list_head *resources, struct resource *res, | 20 | void pci_add_resource_offset(struct list_head *resources, struct resource *res, |
21 | resource_size_t offset) | 21 | resource_size_t offset) |
22 | { | 22 | { |
23 | struct pci_host_bridge_window *window; | 23 | struct resource_entry *entry; |
24 | 24 | ||
25 | window = kzalloc(sizeof(struct pci_host_bridge_window), GFP_KERNEL); | 25 | entry = resource_list_create_entry(res, 0); |
26 | if (!window) { | 26 | if (!entry) { |
27 | printk(KERN_ERR "PCI: can't add host bridge window %pR\n", res); | 27 | printk(KERN_ERR "PCI: can't add host bridge window %pR\n", res); |
28 | return; | 28 | return; |
29 | } | 29 | } |
30 | 30 | ||
31 | window->res = res; | 31 | entry->offset = offset; |
32 | window->offset = offset; | 32 | resource_list_add_tail(entry, resources); |
33 | list_add_tail(&window->list, resources); | ||
34 | } | 33 | } |
35 | EXPORT_SYMBOL(pci_add_resource_offset); | 34 | EXPORT_SYMBOL(pci_add_resource_offset); |
36 | 35 | ||
@@ -42,12 +41,7 @@ EXPORT_SYMBOL(pci_add_resource); | |||
42 | 41 | ||
43 | void pci_free_resource_list(struct list_head *resources) | 42 | void pci_free_resource_list(struct list_head *resources) |
44 | { | 43 | { |
45 | struct pci_host_bridge_window *window, *tmp; | 44 | resource_list_free(resources); |
46 | |||
47 | list_for_each_entry_safe(window, tmp, resources, list) { | ||
48 | list_del(&window->list); | ||
49 | kfree(window); | ||
50 | } | ||
51 | } | 45 | } |
52 | EXPORT_SYMBOL(pci_free_resource_list); | 46 | EXPORT_SYMBOL(pci_free_resource_list); |
53 | 47 | ||