diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-28 12:58:21 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-28 12:58:21 +0200 |
commit | 8e9914d5efe460600f5948da7ae4c1b6c038a4c0 (patch) | |
tree | 2a6ed5d7ba447f2288f05f9b8d54db92b8b28139 /arch/ia64 | |
parent | 80338681bbc5786fa1342d3b7f021c1d8974ac62 (diff) | |
parent | 24071f472d813fccacc1ef7356b1f41422a1b968 (diff) | |
download | op-kernel-dev-8e9914d5efe460600f5948da7ae4c1b6c038a4c0.zip op-kernel-dev-8e9914d5efe460600f5948da7ae4c1b6c038a4c0.tar.gz |
Merge branch 'acpi-scan'
* acpi-scan:
ACPI / scan: Do not bind ACPI drivers to objects with scan handlers
ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery
ACPI / scan: Simplify ACPI driver probing
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/hp/common/sba_iommu.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index bcda5b2..d43daf1 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -2042,7 +2042,8 @@ sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle) #endif static int __init -acpi_sba_ioc_add(struct acpi_device *device) +acpi_sba_ioc_add(struct acpi_device *device, + const struct acpi_device_id *not_used) { struct ioc *ioc; acpi_status status; @@ -2090,14 +2091,18 @@ static const struct acpi_device_id hp_ioc_iommu_device_ids[] = { {"HWP0004", 0}, {"", 0}, }; -static struct acpi_driver acpi_sba_ioc_driver = { - .name = "IOC IOMMU Driver", - .ids = hp_ioc_iommu_device_ids, - .ops = { - .add = acpi_sba_ioc_add, - }, +static struct acpi_scan_handler acpi_sba_ioc_handler = { + .ids = hp_ioc_iommu_device_ids, + .attach = acpi_sba_ioc_add, }; +static int __init acpi_sba_ioc_init_acpi(void) +{ + return acpi_scan_add_handler(&acpi_sba_ioc_handler); +} +/* This has to run before acpi_scan_init(). */ +arch_initcall(acpi_sba_ioc_init_acpi); + extern struct dma_map_ops swiotlb_dma_ops; static int __init @@ -2122,7 +2127,10 @@ sba_init(void) } #endif - acpi_bus_register_driver(&acpi_sba_ioc_driver); + /* + * ioc_list should be populated by the acpi_sba_ioc_handler's .attach() + * routine, but that only happens if acpi_scan_init() has already run. + */ if (!ioc_list) { #ifdef CONFIG_IA64_GENERIC /* |