aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbs.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-11-20 01:20:00 -0500
committerLen Brown <len.brown@intel.com>2007-11-20 01:20:00 -0500
commitc2e46d2e2a8e6ed17fac6154ac7e5fa7fe4efb28 (patch)
tree39e4aa997e6a10ef4eebb31487ea15c3c2e70c34 /drivers/acpi/sbs.c
parent95b00786f3b8fa99f53931361beeb4c10504ad87 (diff)
parent65ea6520375cc09d19ecb46f03ab7ef70bcf06dd (diff)
Pull procfs-default into release branch
Conflicts: drivers/acpi/sbs.c Signed-off-by: Len Brown <len.brown@intel.com>
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 73c1ba314299..6045cdbe176b 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;
@@ -123,7 +123,7 @@ struct acpi_sbs {
123 struct acpi_device *device; 123 struct acpi_device *device;
124 struct acpi_smb_hc *hc; 124 struct acpi_smb_hc *hc;
125 struct mutex lock; 125 struct mutex lock;
126#ifdef CONFIG_ACPI_PROCFS 126#ifdef CONFIG_ACPI_PROCFS_POWER
127 struct proc_dir_entry *charger_entry; 127 struct proc_dir_entry *charger_entry;
128#endif 128#endif
129 struct acpi_battery battery[MAX_SBS_BAT]; 129 struct acpi_battery battery[MAX_SBS_BAT];
@@ -469,7 +469,7 @@ static struct device_attribute alarm_attr = {
469 FS Interface (/proc/acpi) 469 FS Interface (/proc/acpi)
470 -------------------------------------------------------------------------- */ 470 -------------------------------------------------------------------------- */
471 471
472#ifdef CONFIG_ACPI_PROCFS 472#ifdef CONFIG_ACPI_PROCFS_POWER
473/* Generic Routines */ 473/* Generic Routines */
474static int 474static int
475acpi_sbs_add_fs(struct proc_dir_entry **dir, 475acpi_sbs_add_fs(struct proc_dir_entry **dir,
@@ -790,7 +790,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
790 return result; 790 return result;
791 791
792 sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id); 792 sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id);
793#ifdef CONFIG_ACPI_PROCFS 793#ifdef CONFIG_ACPI_PROCFS_POWER
794 acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir, 794 acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir,
795 battery->name, &acpi_battery_info_fops, 795 battery->name, &acpi_battery_info_fops,
796 &acpi_battery_state_fops, &acpi_battery_alarm_fops, 796 &acpi_battery_state_fops, &acpi_battery_alarm_fops,
@@ -831,7 +831,7 @@ static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
831 device_remove_file(battery->bat.dev, &alarm_attr); 831 device_remove_file(battery->bat.dev, &alarm_attr);
832 power_supply_unregister(&battery->bat); 832 power_supply_unregister(&battery->bat);
833 } 833 }
834#ifdef CONFIG_ACPI_PROCFS 834#ifdef CONFIG_ACPI_PROCFS_POWER
835 if (battery->proc_entry) 835 if (battery->proc_entry)
836 acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir); 836 acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir);
837#endif 837#endif
@@ -844,7 +844,7 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
844 result = acpi_ac_get_present(sbs); 844 result = acpi_ac_get_present(sbs);
845 if (result) 845 if (result)
846 goto end; 846 goto end;
847#ifdef CONFIG_ACPI_PROCFS 847#ifdef CONFIG_ACPI_PROCFS_POWER
848 result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir, 848 result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir,
849 ACPI_AC_DIR_NAME, NULL, 849 ACPI_AC_DIR_NAME, NULL,
850 &acpi_ac_state_fops, NULL, sbs); 850 &acpi_ac_state_fops, NULL, sbs);
@@ -868,7 +868,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs)
868{ 868{
869 if (sbs->charger.dev) 869 if (sbs->charger.dev)
870 power_supply_unregister(&sbs->charger); 870 power_supply_unregister(&sbs->charger);
871#ifdef CONFIG_ACPI_PROCFS 871#ifdef CONFIG_ACPI_PROCFS_POWER
872 if (sbs->charger_entry) 872 if (sbs->charger_entry)
873 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir); 873 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir);
874#endif 874#endif
@@ -974,7 +974,7 @@ static int acpi_sbs_remove(struct acpi_device *device, int type)
974 974
975static void acpi_sbs_rmdirs(void) 975static void acpi_sbs_rmdirs(void)
976{ 976{
977#ifdef CONFIG_ACPI_PROCFS 977#ifdef CONFIG_ACPI_PROCFS_POWER
978 if (acpi_ac_dir) { 978 if (acpi_ac_dir) {
979 acpi_unlock_ac_dir(acpi_ac_dir); 979 acpi_unlock_ac_dir(acpi_ac_dir);
980 acpi_ac_dir = NULL; 980 acpi_ac_dir = NULL;
@@ -1013,7 +1013,7 @@ static int __init acpi_sbs_init(void)
1013 1013
1014 if (acpi_disabled) 1014 if (acpi_disabled)
1015 return -ENODEV; 1015 return -ENODEV;
1016#ifdef CONFIG_ACPI_PROCFS 1016#ifdef CONFIG_ACPI_PROCFS_POWER
1017 acpi_ac_dir = acpi_lock_ac_dir(); 1017 acpi_ac_dir = acpi_lock_ac_dir();
1018 if (!acpi_ac_dir) 1018 if (!acpi_ac_dir)
1019 return -ENODEV; 1019 return -ENODEV;