aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-09-19 02:10:40 -0400
committerLen Brown <len.brown@intel.com>2009-09-19 02:10:40 -0400
commitcbeee13570adfb0af494a07074958e4888c2351c (patch)
tree998d9ff501c4abe19ebe5c262aa5b7052fa80b72 /drivers/acpi/processor_idle.c
parent7ef0143e2f898f9bf675c81bdf0e045c8dd53c57 (diff)
parentb188e4ce3b7965ecc8d45191042cc9d25f6b90ee (diff)
Merge branch 'processor-procfs-2.6.32' into release
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 22aab1fc9b45..cc61a6220102 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -682,6 +682,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
682 return 0; 682 return 0;
683} 683}
684 684
685#ifdef CONFIG_ACPI_PROCFS
685static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) 686static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
686{ 687{
687 struct acpi_processor *pr = seq->private; 688 struct acpi_processor *pr = seq->private;
@@ -761,7 +762,7 @@ static const struct file_operations acpi_processor_power_fops = {
761 .llseek = seq_lseek, 762 .llseek = seq_lseek,
762 .release = single_release, 763 .release = single_release,
763}; 764};
764 765#endif
765 766
766/** 767/**
767 * acpi_idle_bm_check - checks if bus master activity was detected 768 * acpi_idle_bm_check - checks if bus master activity was detected
@@ -1162,7 +1163,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1162{ 1163{
1163 acpi_status status = 0; 1164 acpi_status status = 0;
1164 static int first_run; 1165 static int first_run;
1166#ifdef CONFIG_ACPI_PROCFS
1165 struct proc_dir_entry *entry = NULL; 1167 struct proc_dir_entry *entry = NULL;
1168#endif
1166 unsigned int i; 1169 unsigned int i;
1167 1170
1168 if (boot_option_idle_override) 1171 if (boot_option_idle_override)
@@ -1219,7 +1222,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1219 pr->power.states[i].type); 1222 pr->power.states[i].type);
1220 printk(")\n"); 1223 printk(")\n");
1221 } 1224 }
1222 1225#ifdef CONFIG_ACPI_PROCFS
1223 /* 'power' [R] */ 1226 /* 'power' [R] */
1224 entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER, 1227 entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER,
1225 S_IRUGO, acpi_device_dir(device), 1228 S_IRUGO, acpi_device_dir(device),
@@ -1227,6 +1230,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1227 acpi_driver_data(device)); 1230 acpi_driver_data(device));
1228 if (!entry) 1231 if (!entry)
1229 return -EIO; 1232 return -EIO;
1233#endif
1230 return 0; 1234 return 0;
1231} 1235}
1232 1236
@@ -1239,9 +1243,11 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
1239 cpuidle_unregister_device(&pr->power.dev); 1243 cpuidle_unregister_device(&pr->power.dev);
1240 pr->flags.power_setup_done = 0; 1244 pr->flags.power_setup_done = 0;
1241 1245
1246#ifdef CONFIG_ACPI_PROCFS
1242 if (acpi_device_dir(device)) 1247 if (acpi_device_dir(device))
1243 remove_proc_entry(ACPI_PROCESSOR_FILE_POWER, 1248 remove_proc_entry(ACPI_PROCESSOR_FILE_POWER,
1244 acpi_device_dir(device)); 1249 acpi_device_dir(device));
1250#endif
1245 1251
1246 return 0; 1252 return 0;
1247} 1253}