diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:32:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:32:11 -0400 |
commit | c11f6c82581e8be4e1829c677db54e7f55cebece (patch) | |
tree | 1a116241b0831ded998aabe800bdc24104cbd826 /drivers/acpi/processor_idle.c | |
parent | 40aba218969914d1b225e742617adb921cf94eae (diff) | |
parent | 193a6dec1c0246a80b6d0101e4f351ccf877bcac (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (119 commits)
ACPI: don't pass handle for fixed hardware notifications
ACPI: remove null pointer checks in deferred execution path
ACPI: simplify deferred execution path
acerhdf: additional BIOS versions
acerhdf: convert to dev_pm_ops
acerhdf: fix fan control for AOA150 model
thermal: add missing Kconfig dependency
acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file
hp-wmi: fix rfkill memory leak on unload
ACPI: remove unnecessary #ifdef CONFIG_DMI
ACPI: linux/acpi.h should not include linux/dmi.h
hwmon driver for ACPI 4.0 power meters
topstar-laptop: add new driver for hotkeys support on Topstar N01
thinkpad_acpi: fix rfkill memory leak on unload
thinkpad-acpi: report brightness events when required
thinkpad-acpi: don't poll by default any of the reserved hotkeys
thinkpad-acpi: Fix procfs hotkey reset command
thinkpad-acpi: deprecate hotkey_bios_mask
thinkpad-acpi: hotkey poll fixes
thinkpad-acpi: be more strict when detecting a ThinkPad
...
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 66393d5c4c7c..cc61a6220102 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -60,6 +60,8 @@ | |||
60 | #include <acpi/processor.h> | 60 | #include <acpi/processor.h> |
61 | #include <asm/processor.h> | 61 | #include <asm/processor.h> |
62 | 62 | ||
63 | #define PREFIX "ACPI: " | ||
64 | |||
63 | #define ACPI_PROCESSOR_CLASS "processor" | 65 | #define ACPI_PROCESSOR_CLASS "processor" |
64 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT | 66 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT |
65 | ACPI_MODULE_NAME("processor_idle"); | 67 | ACPI_MODULE_NAME("processor_idle"); |
@@ -680,6 +682,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) | |||
680 | return 0; | 682 | return 0; |
681 | } | 683 | } |
682 | 684 | ||
685 | #ifdef CONFIG_ACPI_PROCFS | ||
683 | static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) | 686 | static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) |
684 | { | 687 | { |
685 | struct acpi_processor *pr = seq->private; | 688 | struct acpi_processor *pr = seq->private; |
@@ -759,7 +762,7 @@ static const struct file_operations acpi_processor_power_fops = { | |||
759 | .llseek = seq_lseek, | 762 | .llseek = seq_lseek, |
760 | .release = single_release, | 763 | .release = single_release, |
761 | }; | 764 | }; |
762 | 765 | #endif | |
763 | 766 | ||
764 | /** | 767 | /** |
765 | * acpi_idle_bm_check - checks if bus master activity was detected | 768 | * acpi_idle_bm_check - checks if bus master activity was detected |
@@ -1160,7 +1163,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1160 | { | 1163 | { |
1161 | acpi_status status = 0; | 1164 | acpi_status status = 0; |
1162 | static int first_run; | 1165 | static int first_run; |
1166 | #ifdef CONFIG_ACPI_PROCFS | ||
1163 | struct proc_dir_entry *entry = NULL; | 1167 | struct proc_dir_entry *entry = NULL; |
1168 | #endif | ||
1164 | unsigned int i; | 1169 | unsigned int i; |
1165 | 1170 | ||
1166 | if (boot_option_idle_override) | 1171 | if (boot_option_idle_override) |
@@ -1217,7 +1222,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1217 | pr->power.states[i].type); | 1222 | pr->power.states[i].type); |
1218 | printk(")\n"); | 1223 | printk(")\n"); |
1219 | } | 1224 | } |
1220 | 1225 | #ifdef CONFIG_ACPI_PROCFS | |
1221 | /* 'power' [R] */ | 1226 | /* 'power' [R] */ |
1222 | entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER, | 1227 | entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER, |
1223 | S_IRUGO, acpi_device_dir(device), | 1228 | S_IRUGO, acpi_device_dir(device), |
@@ -1225,6 +1230,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1225 | acpi_driver_data(device)); | 1230 | acpi_driver_data(device)); |
1226 | if (!entry) | 1231 | if (!entry) |
1227 | return -EIO; | 1232 | return -EIO; |
1233 | #endif | ||
1228 | return 0; | 1234 | return 0; |
1229 | } | 1235 | } |
1230 | 1236 | ||
@@ -1237,9 +1243,11 @@ int acpi_processor_power_exit(struct acpi_processor *pr, | |||
1237 | cpuidle_unregister_device(&pr->power.dev); | 1243 | cpuidle_unregister_device(&pr->power.dev); |
1238 | pr->flags.power_setup_done = 0; | 1244 | pr->flags.power_setup_done = 0; |
1239 | 1245 | ||
1246 | #ifdef CONFIG_ACPI_PROCFS | ||
1240 | if (acpi_device_dir(device)) | 1247 | if (acpi_device_dir(device)) |
1241 | remove_proc_entry(ACPI_PROCESSOR_FILE_POWER, | 1248 | remove_proc_entry(ACPI_PROCESSOR_FILE_POWER, |
1242 | acpi_device_dir(device)); | 1249 | acpi_device_dir(device)); |
1250 | #endif | ||
1243 | 1251 | ||
1244 | return 0; | 1252 | return 0; |
1245 | } | 1253 | } |