aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2009-06-23 23:49:49 -0400
committerLen Brown <len.brown@intel.com>2009-06-24 01:13:15 -0400
commit74cad4ee9839669ad920257678ea0bf0a818cd3b (patch)
treea32e8b4baf67eedb2e9dbc9799c326b92017e1ed /drivers/acpi/processor_idle.c
parent07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff)
ACPI: Make ACPI processor proc I/F depend on the ACPI_PROCFS
Now whether the ACPI processor proc I/F is registered depends on the CONFIG_PROC. It had better depend on the CONFIG_ACPI_PROCFS. When the CONFIG_ACPI_PROCFS is unset in kernel configuration, the ACPI processor proc I/F won't be registered. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 10a2d913635a..67b2fa1b5b63 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -679,6 +679,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
679 return 0; 679 return 0;
680} 680}
681 681
682#ifdef CONFIG_ACPI_PROCFS
682static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) 683static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
683{ 684{
684 struct acpi_processor *pr = seq->private; 685 struct acpi_processor *pr = seq->private;
@@ -758,7 +759,7 @@ static const struct file_operations acpi_processor_power_fops = {
758 .llseek = seq_lseek, 759 .llseek = seq_lseek,
759 .release = single_release, 760 .release = single_release,
760}; 761};
761 762#endif
762 763
763/** 764/**
764 * acpi_idle_bm_check - checks if bus master activity was detected 765 * acpi_idle_bm_check - checks if bus master activity was detected
@@ -1216,7 +1217,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1216 pr->power.states[i].type); 1217 pr->power.states[i].type);
1217 printk(")\n"); 1218 printk(")\n");
1218 } 1219 }
1219 1220#ifdef CONFIG_ACPI_PROCFS
1220 /* 'power' [R] */ 1221 /* 'power' [R] */
1221 entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER, 1222 entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER,
1222 S_IRUGO, acpi_device_dir(device), 1223 S_IRUGO, acpi_device_dir(device),
@@ -1224,6 +1225,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1224 acpi_driver_data(device)); 1225 acpi_driver_data(device));
1225 if (!entry) 1226 if (!entry)
1226 return -EIO; 1227 return -EIO;
1228#endif
1227 return 0; 1229 return 0;
1228} 1230}
1229 1231
@@ -1236,9 +1238,11 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
1236 cpuidle_unregister_device(&pr->power.dev); 1238 cpuidle_unregister_device(&pr->power.dev);
1237 pr->flags.power_setup_done = 0; 1239 pr->flags.power_setup_done = 0;
1238 1240
1241#ifdef CONFIG_ACPI_PROCFS
1239 if (acpi_device_dir(device)) 1242 if (acpi_device_dir(device))
1240 remove_proc_entry(ACPI_PROCESSOR_FILE_POWER, 1243 remove_proc_entry(ACPI_PROCESSOR_FILE_POWER,
1241 acpi_device_dir(device)); 1244 acpi_device_dir(device));
1245#endif
1242 1246
1243 return 0; 1247 return 0;
1244} 1248}