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
This commit is contained in:
Коммит
a68d35323b
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче