From 19bb94cd8b2358ff6f5cc3ac492fd87c70ca0c2c Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Sun, 16 May 2010 19:45:54 -0300 Subject: [PATCH] --- yaml --- r: 197555 b: refs/heads/master c: ef07a5abadfcb2470fc9cbfbee0cb41076b4ba9b h: refs/heads/master i: 197553: a631ed1b27ae0020bc342c417e0d2e4677e088f2 197551: a5894311e00af6aec20a0a3756dc77e0d1949401 v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/thinkpad_acpi.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index dd23eebf59e7..9316ce52897f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2cbb5c8f5533facb606adc5986ce40da2e987d6d +refs/heads/master: ef07a5abadfcb2470fc9cbfbee0cb41076b4ba9b diff --git a/trunk/drivers/platform/x86/thinkpad_acpi.c b/trunk/drivers/platform/x86/thinkpad_acpi.c index 29ad27346443..b3bfce953838 100644 --- a/trunk/drivers/platform/x86/thinkpad_acpi.c +++ b/trunk/drivers/platform/x86/thinkpad_acpi.c @@ -516,9 +516,9 @@ static acpi_handle ec_handle; #define TPACPI_HANDLE(object, parent, paths...) \ static acpi_handle object##_handle; \ - static acpi_handle *object##_parent = &parent##_handle; \ - static char *object##_path; \ - static char *object##_paths[] = { paths } + static const acpi_handle *object##_parent __initdata = \ + &parent##_handle; \ + static char *object##_paths[] __initdata = { paths } TPACPI_HANDLE(ecrd, ec, "ECRD"); /* 570 */ TPACPI_HANDLE(ecwr, ec, "ECWR"); /* 570 */ @@ -673,11 +673,11 @@ static int issue_thinkpad_cmos_command(int cmos_cmd) #define TPACPI_ACPIHANDLE_INIT(object) \ drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \ - object##_paths, ARRAY_SIZE(object##_paths), &object##_path) + object##_paths, ARRAY_SIZE(object##_paths)) -static void drv_acpi_handle_init(char *name, - acpi_handle *handle, acpi_handle parent, - char **paths, int num_paths, char **path) +static void __init drv_acpi_handle_init(const char *name, + acpi_handle *handle, const acpi_handle parent, + char **paths, const int num_paths) { int i; acpi_status status; @@ -688,10 +688,9 @@ static void drv_acpi_handle_init(char *name, for (i = 0; i < num_paths; i++) { status = acpi_get_handle(parent, paths[i], handle); if (ACPI_SUCCESS(status)) { - *path = paths[i]; dbg_printk(TPACPI_DBG_INIT, "Found ACPI handle %s for %s\n", - *path, name); + paths[i], name); return; } }