Skip to content

Commit

Permalink
PCI/IA64: Add host bridge resource release for _CRS path
Browse files Browse the repository at this point in the history
Set IA64 host bridge release function to make sure root bridge
related resources get freed during root bus removal.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-ia64@vger.kernel.org
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Yijing Wang authored and Tony Luck committed Jun 18, 2013
1 parent c9e391c commit 2932239
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ static void __release_pci_root_info(struct pci_root_info *info)
kfree(info);
}

static void release_pci_root_info(struct pci_host_bridge *bridge)
{
struct pci_root_info *info = bridge->release_data;

__release_pci_root_info(info);
}

struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
{
struct acpi_device *device = root->device;
Expand Down Expand Up @@ -446,6 +453,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
return NULL;
}

pci_set_host_bridge_release(to_pci_host_bridge(pbus->bridge),
release_pci_root_info, info);
pci_scan_child_bus(pbus);
return pbus;

Expand Down

0 comments on commit 2932239

Please sign in to comment.