aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-15 07:58:43 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-15 07:58:43 -0500
commita68d35323b091f51e0957313f0f871f187879143 (patch)
tree837f44a7eee4a51ee2aa3c61e5d759a091b540e1
parente8f71df723339b6d3861886f58c245812d1994f8 (diff)
parent66f2fda93b67fa744d406e6dcf443f67bac204b6 (diff)
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.c2
-rw-r--r--drivers/acpi/glue.c35
-rw-r--r--drivers/acpi/numa.c6
-rw-r--r--drivers/acpi/sleep.c8
-rw-r--r--drivers/acpi/sysfs.c2
-rw-r--r--drivers/acpi/thermal.c6
-rw-r--r--drivers/acpi/video.c4
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 @@
1/* 1/*
2 * debugfs.c - ACPI debugfs interface to userspace. 2 * custom_method.c - debugfs interface for customizing ACPI control method
3 */ 3 */
4 4
5#include <linux/init.h> 5#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)
98 return ret; 98 return ret;
99} 99}
100 100
101/* Get device's handler per its address under its parent */ 101static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used,
102struct acpi_find_child { 102 void *addr_p, void **ret_p)
103 acpi_handle handle;
104 u64 address;
105};
106
107static acpi_status
108do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
109{ 103{
104 unsigned long long addr;
110 acpi_status status; 105 acpi_status status;
111 struct acpi_device_info *info; 106
112 struct acpi_find_child *find = context; 107 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr);
113 108 if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) {
114 status = acpi_get_object_info(handle, &info); 109 *ret_p = handle;
115 if (ACPI_SUCCESS(status)) { 110 return AE_CTRL_TERMINATE;
116 if ((info->address == find->address)
117 && (info->valid & ACPI_VALID_ADR))
118 find->handle = handle;
119 kfree(info);
120 } 111 }
121 return AE_OK; 112 return AE_OK;
122} 113}
123 114
124acpi_handle acpi_get_child(acpi_handle parent, u64 address) 115acpi_handle acpi_get_child(acpi_handle parent, u64 address)
125{ 116{
126 struct acpi_find_child find = { NULL, address }; 117 void *ret = NULL;
127 118
128 if (!parent) 119 if (!parent)
129 return NULL; 120 return NULL;
130 acpi_walk_namespace(ACPI_TYPE_DEVICE, parent,
131 1, do_acpi_find_child, NULL, &find, NULL);
132 return find.handle;
133}
134 121
122 acpi_walk_namespace(ACPI_TYPE_DEVICE, parent, 1, NULL,
123 do_acpi_find_child, &address, &ret);
124 return (acpi_handle)ret;
125}
135EXPORT_SYMBOL(acpi_get_child); 126EXPORT_SYMBOL(acpi_get_child);
136 127
137static int acpi_bind_one(struct device *dev, acpi_handle handle) 128static 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)
116 struct acpi_srat_mem_affinity *p = 116 struct acpi_srat_mem_affinity *p =
117 (struct acpi_srat_mem_affinity *)header; 117 (struct acpi_srat_mem_affinity *)header;
118 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 118 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
119 "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s\n", 119 "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n",
120 (unsigned long)p->base_address, 120 (unsigned long)p->base_address,
121 (unsigned long)p->length, 121 (unsigned long)p->length,
122 p->proximity_domain, 122 p->proximity_domain,
123 (p->flags & ACPI_SRAT_MEM_ENABLED)? 123 (p->flags & ACPI_SRAT_MEM_ENABLED)?
124 "enabled" : "disabled", 124 "enabled" : "disabled",
125 (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)? 125 (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)?
126 " hot-pluggable" : "")); 126 " hot-pluggable" : "",
127 (p->flags & ACPI_SRAT_MEM_NON_VOLATILE)?
128 " non-volatile" : ""));
127 } 129 }
128#endif /* ACPI_DEBUG_OUTPUT */ 130#endif /* ACPI_DEBUG_OUTPUT */
129 break; 131 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[] = {
177 }, 177 },
178 { 178 {
179 .callback = init_nvs_nosave, 179 .callback = init_nvs_nosave,
180 .ident = "Sony Vaio VGN-FW41E_H",
181 .matches = {
182 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
183 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW41E_H"),
184 },
185 },
186 {
187 .callback = init_nvs_nosave,
180 .ident = "Sony Vaio VGN-FW21E", 188 .ident = "Sony Vaio VGN-FW21E",
181 .matches = { 189 .matches = {
182 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), 190 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,
498 result = acpi_get_gpe_device(index, handle); 498 result = acpi_get_gpe_device(index, handle);
499 if (result) { 499 if (result) {
500 ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND, 500 ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
501 "Invalid GPE 0x%x\n", index)); 501 "Invalid GPE 0x%x", index));
502 goto end; 502 goto end;
503 } 503 }
504 result = acpi_get_gpe_status(*handle, index, status); 504 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 { \
288 if (flags != ACPI_TRIPS_INIT) \ 288 if (flags != ACPI_TRIPS_INIT) \
289 ACPI_EXCEPTION((AE_INFO, AE_ERROR, \ 289 ACPI_EXCEPTION((AE_INFO, AE_ERROR, \
290 "ACPI thermal trip point %s changed\n" \ 290 "ACPI thermal trip point %s changed\n" \
291 "Please send acpidump to linux-acpi@vger.kernel.org\n", str)); \ 291 "Please send acpidump to linux-acpi@vger.kernel.org", str)); \
292} while (0) 292} while (0)
293 293
294static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) 294static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
@@ -531,6 +531,10 @@ static void acpi_thermal_check(void *data)
531{ 531{
532 struct acpi_thermal *tz = data; 532 struct acpi_thermal *tz = data;
533 533
534 if (!tz->tz_enabled) {
535 pr_warn("thermal zone is disabled \n");
536 return;
537 }
534 thermal_zone_device_update(tz->thermal_zone); 538 thermal_zone_device_update(tz->thermal_zone);
535} 539}
536 540
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)
673 br->levels[i] = br->levels[i - level_ac_battery]; 673 br->levels[i] = br->levels[i - level_ac_battery];
674 count += level_ac_battery; 674 count += level_ac_battery;
675 } else if (level_ac_battery > 2) 675 } else if (level_ac_battery > 2)
676 ACPI_ERROR((AE_INFO, "Too many duplicates in _BCL package\n")); 676 ACPI_ERROR((AE_INFO, "Too many duplicates in _BCL package"));
677 677
678 /* Check if the _BCL package is in a reversed order */ 678 /* Check if the _BCL package is in a reversed order */
679 if (max_level == br->levels[2]) { 679 if (max_level == br->levels[2]) {
@@ -682,7 +682,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
682 acpi_video_cmp_level, NULL); 682 acpi_video_cmp_level, NULL);
683 } else if (max_level != br->levels[count - 1]) 683 } else if (max_level != br->levels[count - 1])
684 ACPI_ERROR((AE_INFO, 684 ACPI_ERROR((AE_INFO,
685 "Found unordered _BCL package\n")); 685 "Found unordered _BCL package"));
686 686
687 br->count = count; 687 br->count = count;
688 device->brightness = br; 688 device->brightness = br;