diff options
author | Len Brown <len.brown@intel.com> | 2010-10-25 10:11:49 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-10-25 10:11:49 +0400 |
commit | f3ab69a321d08ce123dce8166eabe7fddd94b949 (patch) | |
tree | 9de4e6e018cd57d4c84aa82dfbd02bf9f2800ade /drivers/acpi/processor_driver.c | |
parent | aca209e5e654951a3a90f5aaa8e04e0c470993b4 (diff) | |
parent | 03e7c3432d40d067476eaf49ede29128b637998f (diff) | |
download | linux-f3ab69a321d08ce123dce8166eabe7fddd94b949.tar.xz |
Merge branch 'procfs-cleanup-v2' into release
Diffstat (limited to 'drivers/acpi/processor_driver.c')
-rw-r--r-- | drivers/acpi/processor_driver.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 347eb21b2353..356c320bdd08 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -40,8 +40,10 @@ #include <linux/pm.h> #include <linux/cpufreq.h> #include <linux/cpu.h> +#ifdef CONFIG_ACPI_PROCFS #include <linux/proc_fs.h> #include <linux/seq_file.h> +#endif #include <linux/dmi.h> #include <linux/moduleparam.h> #include <linux/cpuidle.h> @@ -244,6 +246,7 @@ static int acpi_processor_errata(struct acpi_processor *pr) return result; } +#ifdef CONFIG_ACPI_PROCFS static struct proc_dir_entry *acpi_processor_dir = NULL; static int __cpuinit acpi_processor_add_fs(struct acpi_device *device) @@ -280,7 +283,16 @@ static int acpi_processor_remove_fs(struct acpi_device *device) return 0; } - +#else +static inline int acpi_processor_add_fs(struct acpi_device *device) +{ + return 0; +} +static inline int acpi_processor_remove_fs(struct acpi_device *device) +{ + return 0; +} +#endif /* -------------------------------------------------------------------------- Driver Interface -------------------------------------------------------------------------- */ @@ -842,9 +854,11 @@ static int __init acpi_processor_init(void) memset(&errata, 0, sizeof(errata)); +#ifdef CONFIG_ACPI_PROCFS acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); if (!acpi_processor_dir) return -ENOMEM; +#endif if (!cpuidle_register_driver(&acpi_idle_driver)) { printk(KERN_DEBUG "ACPI: %s registered with cpuidle\n", @@ -871,7 +885,9 @@ static int __init acpi_processor_init(void) out_cpuidle: cpuidle_unregister_driver(&acpi_idle_driver); +#ifdef CONFIG_ACPI_PROCFS remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); +#endif return result; } @@ -891,7 +907,9 @@ static void __exit acpi_processor_exit(void) cpuidle_unregister_driver(&acpi_idle_driver); +#ifdef CONFIG_ACPI_PROCFS remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); +#endif return; } |