diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 29ad27346443..b3bfce953838 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -516,9 +516,9 @@ static acpi_handle ec_handle; | |||
516 | 516 | ||
517 | #define TPACPI_HANDLE(object, parent, paths...) \ | 517 | #define TPACPI_HANDLE(object, parent, paths...) \ |
518 | static acpi_handle object##_handle; \ | 518 | static acpi_handle object##_handle; \ |
519 | static acpi_handle *object##_parent = &parent##_handle; \ | 519 | static const acpi_handle *object##_parent __initdata = \ |
520 | static char *object##_path; \ | 520 | &parent##_handle; \ |
521 | static char *object##_paths[] = { paths } | 521 | static char *object##_paths[] __initdata = { paths } |
522 | 522 | ||
523 | TPACPI_HANDLE(ecrd, ec, "ECRD"); /* 570 */ | 523 | TPACPI_HANDLE(ecrd, ec, "ECRD"); /* 570 */ |
524 | TPACPI_HANDLE(ecwr, ec, "ECWR"); /* 570 */ | 524 | TPACPI_HANDLE(ecwr, ec, "ECWR"); /* 570 */ |
@@ -673,11 +673,11 @@ static int issue_thinkpad_cmos_command(int cmos_cmd) | |||
673 | 673 | ||
674 | #define TPACPI_ACPIHANDLE_INIT(object) \ | 674 | #define TPACPI_ACPIHANDLE_INIT(object) \ |
675 | drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \ | 675 | drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \ |
676 | object##_paths, ARRAY_SIZE(object##_paths), &object##_path) | 676 | object##_paths, ARRAY_SIZE(object##_paths)) |
677 | 677 | ||
678 | static void drv_acpi_handle_init(char *name, | 678 | static void __init drv_acpi_handle_init(const char *name, |
679 | acpi_handle *handle, acpi_handle parent, | 679 | acpi_handle *handle, const acpi_handle parent, |
680 | char **paths, int num_paths, char **path) | 680 | char **paths, const int num_paths) |
681 | { | 681 | { |
682 | int i; | 682 | int i; |
683 | acpi_status status; | 683 | acpi_status status; |
@@ -688,10 +688,9 @@ static void drv_acpi_handle_init(char *name, | |||
688 | for (i = 0; i < num_paths; i++) { | 688 | for (i = 0; i < num_paths; i++) { |
689 | status = acpi_get_handle(parent, paths[i], handle); | 689 | status = acpi_get_handle(parent, paths[i], handle); |
690 | if (ACPI_SUCCESS(status)) { | 690 | if (ACPI_SUCCESS(status)) { |
691 | *path = paths[i]; | ||
692 | dbg_printk(TPACPI_DBG_INIT, | 691 | dbg_printk(TPACPI_DBG_INIT, |
693 | "Found ACPI handle %s for %s\n", | 692 | "Found ACPI handle %s for %s\n", |
694 | *path, name); | 693 | paths[i], name); |
695 | return; | 694 | return; |
696 | } | 695 | } |
697 | } | 696 | } |