From ab80f0134b573fe4ae55141dd336a079591d9439 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 8 Nov 2005 05:27:00 -0500 Subject: [PATCH] --- yaml --- r: 14842 b: refs/heads/master c: 59d399d357a7705568f424c6e861ee8657f7f655 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/i386/kernel/acpi/boot.c | 7 ------- trunk/drivers/acpi/Kconfig | 1 + trunk/drivers/acpi/Makefile | 2 +- trunk/drivers/acpi/processor_idle.c | 29 +++++------------------------ trunk/drivers/acpi/scan.c | 2 +- trunk/drivers/acpi/video.c | 2 +- 7 files changed, 10 insertions(+), 35 deletions(-) diff --git a/[refs] b/[refs] index 30ec1665d5fc..80d1d6607e00 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c8734a9663806b7ebd3b5e33bae65a60ff6553bd +refs/heads/master: 59d399d357a7705568f424c6e861ee8657f7f655 diff --git a/trunk/arch/i386/kernel/acpi/boot.c b/trunk/arch/i386/kernel/acpi/boot.c index 447fa9e33ffb..76b1135d401a 100644 --- a/trunk/arch/i386/kernel/acpi/boot.c +++ b/trunk/arch/i386/kernel/acpi/boot.c @@ -638,13 +638,6 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) return 0; pmtmr_ioport = fadt->xpm_tmr_blk.address; - /* - * "X" fields are optional extensions to the original V1.0 - * fields, so we must selectively expand V1.0 fields if the - * corresponding X field is zero. - */ - if (!pmtmr_ioport) - pmtmr_ioport = fadt->V1_pm_tmr_blk; } else { /* FADT rev. 1 */ pmtmr_ioport = fadt->V1_pm_tmr_blk; diff --git a/trunk/drivers/acpi/Kconfig b/trunk/drivers/acpi/Kconfig index fce21c257523..fe1e8126fbae 100644 --- a/trunk/drivers/acpi/Kconfig +++ b/trunk/drivers/acpi/Kconfig @@ -197,6 +197,7 @@ config ACPI_ASUS config ACPI_IBM tristate "IBM ThinkPad Laptop Extras" depends on X86 + default y ---help--- This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds support for Fn-Fx key combinations, Bluetooth control, video diff --git a/trunk/drivers/acpi/Makefile b/trunk/drivers/acpi/Makefile index 5984b4f6715a..a18243488c66 100644 --- a/trunk/drivers/acpi/Makefile +++ b/trunk/drivers/acpi/Makefile @@ -16,7 +16,7 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS) # ACPI Boot-Time Table Parsing # obj-y += tables.o -obj-$(CONFIG_X86) += blacklist.o +obj-y += blacklist.o # # ACPI Core Subsystem (Interpreter) diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index 83fd1b6c10c4..70d8a6ec0920 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -280,16 +280,6 @@ static void acpi_processor_idle(void) cx->usage++; -#ifdef CONFIG_HOTPLUG_CPU - /* - * Check for P_LVL2_UP flag before entering C2 and above on - * an SMP system. We do it here instead of doing it at _CST/P_LVL - * detection phase, to work cleanly with logical CPU hotplug. - */ - if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && - !pr->flags.has_cst && acpi_fadt.plvl2_up) - cx->type = ACPI_STATE_C1; -#endif /* * Sleep: * ------ @@ -544,15 +534,6 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) pr->power.states[ACPI_STATE_C0].valid = 1; pr->power.states[ACPI_STATE_C1].valid = 1; -#ifndef CONFIG_HOTPLUG_CPU - /* - * Check for P_LVL2_UP flag before entering C2 and above on - * an SMP system. - */ - if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) - return_VALUE(-ENODEV); -#endif - /* determine C2 and C3 address from pblk */ pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4; pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; @@ -709,7 +690,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) /* Validate number of power states discovered */ if (pr->power.count < 2) - status = -EFAULT; + status = -ENODEV; end: acpi_os_free(buffer.pointer); @@ -860,11 +841,11 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) * this function */ result = acpi_processor_get_power_info_cst(pr); - if (result == -ENODEV) + if ((result) || (acpi_processor_power_verify(pr) < 2)) { result = acpi_processor_get_power_info_fadt(pr); - - if ((result) || (acpi_processor_power_verify(pr) < 2)) - result = acpi_processor_get_power_info_default_c1(pr); + if ((result) || (acpi_processor_power_verify(pr) < 2)) + result = acpi_processor_get_power_info_default_c1(pr); + } /* * Set Default Policy diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index 31218e1d2a18..23e2c6968a11 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -1110,7 +1110,7 @@ acpi_add_single_object(struct acpi_device **child, * * TBD: Assumes LDM provides driver hot-plug capability. */ - acpi_bus_find_driver(device); + result = acpi_bus_find_driver(device); end: if (!result) diff --git a/trunk/drivers/acpi/video.c b/trunk/drivers/acpi/video.c index f051b151580d..d10668f14699 100644 --- a/trunk/drivers/acpi/video.c +++ b/trunk/drivers/acpi/video.c @@ -812,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file, ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); - if (!dev || count + 1 > sizeof str) + if (!dev || !dev->brightness || count + 1 > sizeof str) return_VALUE(-EINVAL); if (copy_from_user(str, buffer, count))