aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sbs.c')
-rw-r--r--drivers/acpi/sbs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 90fd09c65f95..278d20f9366a 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -29,7 +29,7 @@
29#include <linux/moduleparam.h> 29#include <linux/moduleparam.h>
30#include <linux/kernel.h> 30#include <linux/kernel.h>
31 31
32#ifdef CONFIG_ACPI_PROCFS 32#ifdef CONFIG_ACPI_PROCFS_POWER
33#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
34#include <linux/seq_file.h> 34#include <linux/seq_file.h>
35#include <asm/uaccess.h> 35#include <asm/uaccess.h>
@@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
88struct acpi_battery { 88struct acpi_battery {
89 struct power_supply bat; 89 struct power_supply bat;
90 struct acpi_sbs *sbs; 90 struct acpi_sbs *sbs;
91#ifdef CONFIG_ACPI_PROCFS 91#ifdef CONFIG_ACPI_PROCFS_POWER
92 struct proc_dir_entry *proc_entry; 92 struct proc_dir_entry *proc_entry;
93#endif 93#endif
94 unsigned long update_time; 94 unsigned long update_time;
@@ -122,7 +122,7 @@ struct acpi_sbs {
122 struct acpi_device *device; 122 struct acpi_device *device;
123 struct acpi_smb_hc *hc; 123 struct acpi_smb_hc *hc;
124 struct mutex lock; 124 struct mutex lock;
125#ifdef CONFIG_ACPI_PROCFS 125#ifdef CONFIG_ACPI_PROCFS_POWER
126 struct proc_dir_entry *charger_entry; 126 struct proc_dir_entry *charger_entry;
127#endif 127#endif
128 struct acpi_battery battery[MAX_SBS_BAT]; 128 struct acpi_battery battery[MAX_SBS_BAT];
@@ -468,7 +468,7 @@ static struct device_attribute alarm_attr = {
468 FS Interface (/proc/acpi) 468 FS Interface (/proc/acpi)
469 -------------------------------------------------------------------------- */ 469 -------------------------------------------------------------------------- */
470 470
471#ifdef CONFIG_ACPI_PROCFS 471#ifdef CONFIG_ACPI_PROCFS_POWER
472/* Generic Routines */ 472/* Generic Routines */
473static int 473static int
474acpi_sbs_add_fs(struct proc_dir_entry **dir, 474acpi_sbs_add_fs(struct proc_dir_entry **dir,
@@ -789,7 +789,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
789 return result; 789 return result;
790 790
791 sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id); 791 sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id);
792#ifdef CONFIG_ACPI_PROCFS 792#ifdef CONFIG_ACPI_PROCFS_POWER
793 acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir, 793 acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir,
794 battery->name, &acpi_battery_info_fops, 794 battery->name, &acpi_battery_info_fops,
795 &acpi_battery_state_fops, &acpi_battery_alarm_fops, 795 &acpi_battery_state_fops, &acpi_battery_alarm_fops,
@@ -820,7 +820,7 @@ static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
820 if (sbs->battery[id].bat.dev) 820 if (sbs->battery[id].bat.dev)
821 device_remove_file(sbs->battery[id].bat.dev, &alarm_attr); 821 device_remove_file(sbs->battery[id].bat.dev, &alarm_attr);
822 power_supply_unregister(&sbs->battery[id].bat); 822 power_supply_unregister(&sbs->battery[id].bat);
823#ifdef CONFIG_ACPI_PROCFS 823#ifdef CONFIG_ACPI_PROCFS_POWER
824 if (sbs->battery[id].proc_entry) { 824 if (sbs->battery[id].proc_entry) {
825 acpi_sbs_remove_fs(&(sbs->battery[id].proc_entry), 825 acpi_sbs_remove_fs(&(sbs->battery[id].proc_entry),
826 acpi_battery_dir); 826 acpi_battery_dir);
@@ -835,7 +835,7 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
835 result = acpi_ac_get_present(sbs); 835 result = acpi_ac_get_present(sbs);
836 if (result) 836 if (result)
837 goto end; 837 goto end;
838#ifdef CONFIG_ACPI_PROCFS 838#ifdef CONFIG_ACPI_PROCFS_POWER
839 result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir, 839 result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir,
840 ACPI_AC_DIR_NAME, NULL, 840 ACPI_AC_DIR_NAME, NULL,
841 &acpi_ac_state_fops, NULL, sbs); 841 &acpi_ac_state_fops, NULL, sbs);
@@ -859,7 +859,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs)
859{ 859{
860 if (sbs->charger.dev) 860 if (sbs->charger.dev)
861 power_supply_unregister(&sbs->charger); 861 power_supply_unregister(&sbs->charger);
862#ifdef CONFIG_ACPI_PROCFS 862#ifdef CONFIG_ACPI_PROCFS_POWER
863 if (sbs->charger_entry) 863 if (sbs->charger_entry)
864 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir); 864 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir);
865#endif 865#endif
@@ -965,7 +965,7 @@ static int acpi_sbs_remove(struct acpi_device *device, int type)
965 965
966static void acpi_sbs_rmdirs(void) 966static void acpi_sbs_rmdirs(void)
967{ 967{
968#ifdef CONFIG_ACPI_PROCFS 968#ifdef CONFIG_ACPI_PROCFS_POWER
969 if (acpi_ac_dir) { 969 if (acpi_ac_dir) {
970 acpi_unlock_ac_dir(acpi_ac_dir); 970 acpi_unlock_ac_dir(acpi_ac_dir);
971 acpi_ac_dir = NULL; 971 acpi_ac_dir = NULL;
@@ -1004,7 +1004,7 @@ static int __init acpi_sbs_init(void)
1004 1004
1005 if (acpi_disabled) 1005 if (acpi_disabled)
1006 return -ENODEV; 1006 return -ENODEV;
1007#ifdef CONFIG_ACPI_PROCFS 1007#ifdef CONFIG_ACPI_PROCFS_POWER
1008 acpi_ac_dir = acpi_lock_ac_dir(); 1008 acpi_ac_dir = acpi_lock_ac_dir();
1009 if (!acpi_ac_dir) 1009 if (!acpi_ac_dir)
1010 return -ENODEV; 1010 return -ENODEV;