From 16be87ea170ae6cfaa9f47f79d14f7577d8cb420 Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Fri, 24 Oct 2008 17:22:04 +0800 Subject: ACPI: cpufreq, processor: fix compile error in drivers/acpi/processor_perflib.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When trying to build 2.6.28-rc1 on ia64, make aborts with: CC drivers/acpi/processor_perflib.o drivers/acpi/processor_perflib.c:41:28: error: asm/cpufeature.h: No such file or directory drivers/acpi/processor_perflib.c: In function ‘acpi_processor_get_performance_info’: drivers/acpi/processor_perflib.c:364: error: implicit declaration of function ‘boot_cpu_has’ drivers/acpi/processor_perflib.c:364: error: ‘X86_FEATURE_EST’ undeclared (first use in this function) drivers/acpi/processor_perflib.c:364: error: (Each undeclared identifier is reported only once drivers/acpi/processor_perflib.c:364: error: for each function it appears in.) make[2]: *** [drivers/acpi/processor_perflib.o] Error 1 make[1]: *** [drivers/acpi] Error 2 make: *** [drivers] Error 2 this patch fix it. Signed-off-by: Miao Xie Acked-by: Thomas Renninger Signed-off-by: Len Brown --- drivers/acpi/processor_perflib.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index dc98f7a6f2c4..dbcf260ea93f 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -38,7 +38,10 @@ #include #endif + +#ifdef CONFIG_X86 #include +#endif #include #include @@ -360,11 +363,13 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) * the BIOS is older than the CPU and does not know its frequencies */ update_bios: +#ifdef CONFIG_X86 if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ if(boot_cpu_has(X86_FEATURE_EST)) printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " "frequency support\n"); } +#endif return result; } -- cgit v1.2.2 From df316e939100e789b3c5d4d102619ccf5834bd00 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 24 Oct 2008 00:28:33 +0300 Subject: ACPI: Always report a sync event after a lid state change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently not always an EV_SYN event is reported to userland after the EV_SW SW_LID event has been sent. This is easy to verify by using “input-events” from input-utils and just closing and opening the lid. Signed-off-by: Guillem Jover Signed-off-by: Len Brown --- drivers/acpi/button.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 9d568d417eaa..cb046c3fc3f2 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct acpi_button *button) return -ENODEV; /* input layer checks if event is redundant */ input_report_switch(button->input, SW_LID, !state); + input_sync(button->input); return 0; } @@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) input_report_key(input, keycode, 1); input_sync(input); input_report_key(input, keycode, 0); + input_sync(input); } - input_sync(input); acpi_bus_generate_proc_event(button->device, event, ++button->pushed); -- cgit v1.2.2 From cab08969188e2da09923fe9c4a99ec9b934b0708 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 24 Oct 2008 15:39:47 -0400 Subject: toshiba_acpi: always call input_sync() after input_report_switch() Signed-off-by: Len Brown --- drivers/acpi/toshiba_acpi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 2a632f8b7a05..66aac06f2ac5 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c @@ -371,6 +371,7 @@ static void bt_poll_rfkill(struct input_polled_dev *poll_dev) RFKILL_STATE_HARD_BLOCKED); input_report_switch(poll_dev->input, SW_RFKILL_ALL, new_rfk_state); + input_sync(poll_dev->input); } } @@ -842,6 +843,7 @@ static int __init toshiba_acpi_init(void) set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit); set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit); input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE); + input_sync(toshiba_acpi.poll_dev->input); ret = input_register_polled_device(toshiba_acpi.poll_dev); if (ret) { -- cgit v1.2.2 From 92daa7b53b76984565dfdfda5d9c679884121fb2 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 23 Oct 2008 21:46:43 +0200 Subject: ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y. Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown --- drivers/acpi/sleep/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 26571bafb158..80c0868d0480 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c @@ -163,6 +163,8 @@ static void acpi_pm_end(void) acpi_target_sleep_state = ACPI_STATE_S0; acpi_sleep_tts_switch(acpi_target_sleep_state); } +#else /* !CONFIG_ACPI_SLEEP */ +#define acpi_target_sleep_state ACPI_STATE_S0 #endif /* CONFIG_ACPI_SLEEP */ #ifdef CONFIG_SUSPEND -- cgit v1.2.2