diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-15 16:58:43 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-15 16:58:43 +0400 |
commit | a68d35323b091f51e0957313f0f871f187879143 (patch) | |
tree | 837f44a7eee4a51ee2aa3c61e5d759a091b540e1 | |
parent | e8f71df723339b6d3861886f58c245812d1994f8 (diff) | |
parent | 66f2fda93b67fa744d406e6dcf443f67bac204b6 (diff) | |
download | linux-a68d35323b091f51e0957313f0f871f187879143.tar.xz |
Merge branch 'acpi-assorted'
* acpi-assorted:
ACPI: Add DMI entry for Sony VGN-FW41E_H
ACPI: fix obsolete comment in custom_method.c
ACPI / thermal: Use mode to enable/disable kernel thermal processing
ACPI thermal: remove unnecessary newline from exception message
ACPI sysfs: remove unnecessary newline from exception
ACPI video: remove unnecessary newline from error messages
ACPI: SRAT: report non-volatile memory in debug
ACPI: Rework acpi_get_child() to be more efficient
-rw-r--r-- | drivers/acpi/custom_method.c | 2 | ||||
-rw-r--r-- | drivers/acpi/glue.c | 35 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 6 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 8 | ||||
-rw-r--r-- | drivers/acpi/sysfs.c | 2 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 6 | ||||
-rw-r--r-- | drivers/acpi/video.c | 4 |
7 files changed, 34 insertions, 29 deletions
diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c index 5d42c2414ae5..6adfc706a1de 100644 --- a/drivers/acpi/custom_method.c +++ b/drivers/acpi/custom_method.c @@ -1,5 +1,5 @@ /* - * debugfs.c - ACPI debugfs interface to userspace. + * custom_method.c - debugfs interface for customizing ACPI control method */ #include <linux/init.h> diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 9aee4fc2b218..ef6f155469b5 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -98,40 +98,31 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle) return ret; } -/* Get device's handler per its address under its parent */ -struct acpi_find_child { - acpi_handle handle; - u64 address; -}; - -static acpi_status -do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv) +static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used, + void *addr_p, void **ret_p) { + unsigned long long addr; acpi_status status; - struct acpi_device_info *info; - struct acpi_find_child *find = context; - - status = acpi_get_object_info(handle, &info); - if (ACPI_SUCCESS(status)) { - if ((info->address == find->address) - && (info->valid & ACPI_VALID_ADR)) - find->handle = handle; - kfree(info); + + status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr); + if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) { + *ret_p = handle; + return AE_CTRL_TERMINATE; } return AE_OK; } acpi_handle acpi_get_child(acpi_handle parent, u64 address) { - struct acpi_find_child find = { NULL, address }; + void *ret = NULL; if (!parent) return NULL; - acpi_walk_namespace(ACPI_TYPE_DEVICE, parent, - 1, do_acpi_find_child, NULL, &find, NULL); - return find.handle; -} + acpi_walk_namespace(ACPI_TYPE_DEVICE, parent, 1, NULL, + do_acpi_find_child, &address, &ret); + return (acpi_handle)ret; +} EXPORT_SYMBOL(acpi_get_child); static int acpi_bind_one(struct device *dev, acpi_handle handle) diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 5ddbc65e0f6e..33e609f63585 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -116,14 +116,16 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) struct acpi_srat_mem_affinity *p = (struct acpi_srat_mem_affinity *)header; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s\n", + "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n", (unsigned long)p->base_address, (unsigned long)p->length, p->proximity_domain, (p->flags & ACPI_SRAT_MEM_ENABLED)? "enabled" : "disabled", (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)? - " hot-pluggable" : "")); + " hot-pluggable" : "", + (p->flags & ACPI_SRAT_MEM_NON_VOLATILE)? + " non-volatile" : "")); } #endif /* ACPI_DEBUG_OUTPUT */ break; diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 277aa825edd9..6d3a06a629a1 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -177,6 +177,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { }, { .callback = init_nvs_nosave, + .ident = "Sony Vaio VGN-FW41E_H", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW41E_H"), + }, + }, + { + .callback = init_nvs_nosave, .ident = "Sony Vaio VGN-FW21E", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index ea61ca9129cd..41c0504470db 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -498,7 +498,7 @@ static int get_status(u32 index, acpi_event_status *status, result = acpi_get_gpe_device(index, handle); if (result) { ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND, - "Invalid GPE 0x%x\n", index)); + "Invalid GPE 0x%x", index)); goto end; } result = acpi_get_gpe_status(*handle, index, status); diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index da079d4e0baa..8470771e5eae 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -288,7 +288,7 @@ do { \ if (flags != ACPI_TRIPS_INIT) \ ACPI_EXCEPTION((AE_INFO, AE_ERROR, \ "ACPI thermal trip point %s changed\n" \ - "Please send acpidump to linux-acpi@vger.kernel.org\n", str)); \ + "Please send acpidump to linux-acpi@vger.kernel.org", str)); \ } while (0) static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) @@ -531,6 +531,10 @@ static void acpi_thermal_check(void *data) { struct acpi_thermal *tz = data; + if (!tz->tz_enabled) { + pr_warn("thermal zone is disabled \n"); + return; + } thermal_zone_device_update(tz->thermal_zone); } diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 5be60ad8381f..313f959413dc 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -673,7 +673,7 @@ acpi_video_init_brightness(struct acpi_video_device *device) br->levels[i] = br->levels[i - level_ac_battery]; count += level_ac_battery; } else if (level_ac_battery > 2) - ACPI_ERROR((AE_INFO, "Too many duplicates in _BCL package\n")); + ACPI_ERROR((AE_INFO, "Too many duplicates in _BCL package")); /* Check if the _BCL package is in a reversed order */ if (max_level == br->levels[2]) { @@ -682,7 +682,7 @@ acpi_video_init_brightness(struct acpi_video_device *device) acpi_video_cmp_level, NULL); } else if (max_level != br->levels[count - 1]) ACPI_ERROR((AE_INFO, - "Found unordered _BCL package\n")); + "Found unordered _BCL package")); br->count = count; device->brightness = br; |