aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-01-26 03:58:56 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-26 10:09:56 -0500
commita45de93eb10ae44446aec2c73d722562ab46092a (patch)
treedf3cdda47c765c1273c5eb4241d8f3c17b4c215b /drivers/pnp
parente044d8f92f79db167bb7f9dfd0f317e3238d82d1 (diff)
ACPICA: Resources: Provide common part for struct acpi_resource_address structures.
struct acpi_resource_address and struct acpi_resource_extended_address64 share substracts just at different offsets. To unify the parsing functions, OSPMs like Linux need a new ACPI_ADDRESS64_ATTRIBUTE as their substructs, so they can extract the shared data. This patch also synchronizes the structure changes to the Linux kernel. The usages are searched by matching the following keywords: 1. acpi_resource_address 2. acpi_resource_extended_address 3. ACPI_RESOURCE_TYPE_ADDRESS 4. ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS And we found and fixed the usages in the following files: arch/ia64/kernel/acpi-ext.c arch/ia64/pci/pci.c arch/x86/pci/acpi.c arch/x86/pci/mmconfig-shared.c drivers/xen/xen-acpi-memhotplug.c drivers/acpi/acpi_memhotplug.c drivers/acpi/pci_root.c drivers/acpi/resource.c drivers/char/hpet.c drivers/pnp/pnpacpi/rsparser.c drivers/hv/vmbus_drv.c Build tests are passed with defconfig/allnoconfig/allyesconfig and defconfig+CONFIG_ACPI=n. Original-by: Thomas Gleixner <tglx@linutronix.de> Original-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 66977ebf13b3..2d9bc789af0f 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -410,12 +410,12 @@ static __init void pnpacpi_parse_address_option(struct pnp_dev *dev,
410 if (p->resource_type == ACPI_MEMORY_RANGE) { 410 if (p->resource_type == ACPI_MEMORY_RANGE) {
411 if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY) 411 if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY)
412 flags = IORESOURCE_MEM_WRITEABLE; 412 flags = IORESOURCE_MEM_WRITEABLE;
413 pnp_register_mem_resource(dev, option_flags, p->minimum, 413 pnp_register_mem_resource(dev, option_flags, p->address.minimum,
414 p->minimum, 0, p->address_length, 414 p->address.minimum, 0, p->address.address_length,
415 flags); 415 flags);
416 } else if (p->resource_type == ACPI_IO_RANGE) 416 } else if (p->resource_type == ACPI_IO_RANGE)
417 pnp_register_port_resource(dev, option_flags, p->minimum, 417 pnp_register_port_resource(dev, option_flags, p->address.minimum,
418 p->minimum, 0, p->address_length, 418 p->address.minimum, 0, p->address.address_length,
419 IORESOURCE_IO_FIXED); 419 IORESOURCE_IO_FIXED);
420} 420}
421 421
@@ -429,12 +429,12 @@ static __init void pnpacpi_parse_ext_address_option(struct pnp_dev *dev,
429 if (p->resource_type == ACPI_MEMORY_RANGE) { 429 if (p->resource_type == ACPI_MEMORY_RANGE) {
430 if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY) 430 if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY)
431 flags = IORESOURCE_MEM_WRITEABLE; 431 flags = IORESOURCE_MEM_WRITEABLE;
432 pnp_register_mem_resource(dev, option_flags, p->minimum, 432 pnp_register_mem_resource(dev, option_flags, p->address.minimum,
433 p->minimum, 0, p->address_length, 433 p->address.minimum, 0, p->address.address_length,
434 flags); 434 flags);
435 } else if (p->resource_type == ACPI_IO_RANGE) 435 } else if (p->resource_type == ACPI_IO_RANGE)
436 pnp_register_port_resource(dev, option_flags, p->minimum, 436 pnp_register_port_resource(dev, option_flags, p->address.minimum,
437 p->minimum, 0, p->address_length, 437 p->address.minimum, 0, p->address.address_length,
438 IORESOURCE_IO_FIXED); 438 IORESOURCE_IO_FIXED);
439} 439}
440 440