Pull procfs-default into release branch
Conflicts: drivers/acpi/sbs.c Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
|
||||
struct acpi_battery {
|
||||
struct power_supply bat;
|
||||
struct acpi_sbs *sbs;
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
struct proc_dir_entry *proc_entry;
|
||||
#endif
|
||||
unsigned long update_time;
|
||||
@@ -123,7 +123,7 @@ struct acpi_sbs {
|
||||
struct acpi_device *device;
|
||||
struct acpi_smb_hc *hc;
|
||||
struct mutex lock;
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
struct proc_dir_entry *charger_entry;
|
||||
#endif
|
||||
struct acpi_battery battery[MAX_SBS_BAT];
|
||||
@@ -469,7 +469,7 @@ static struct device_attribute alarm_attr = {
|
||||
FS Interface (/proc/acpi)
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
/* Generic Routines */
|
||||
static int
|
||||
acpi_sbs_add_fs(struct proc_dir_entry **dir,
|
||||
@@ -790,7 +790,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
|
||||
return result;
|
||||
|
||||
sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id);
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir,
|
||||
battery->name, &acpi_battery_info_fops,
|
||||
&acpi_battery_state_fops, &acpi_battery_alarm_fops,
|
||||
@@ -831,7 +831,7 @@ static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
|
||||
device_remove_file(battery->bat.dev, &alarm_attr);
|
||||
power_supply_unregister(&battery->bat);
|
||||
}
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
if (battery->proc_entry)
|
||||
acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir);
|
||||
#endif
|
||||
@@ -844,7 +844,7 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
|
||||
result = acpi_ac_get_present(sbs);
|
||||
if (result)
|
||||
goto end;
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir,
|
||||
ACPI_AC_DIR_NAME, NULL,
|
||||
&acpi_ac_state_fops, NULL, sbs);
|
||||
@@ -868,7 +868,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs)
|
||||
{
|
||||
if (sbs->charger.dev)
|
||||
power_supply_unregister(&sbs->charger);
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
if (sbs->charger_entry)
|
||||
acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir);
|
||||
#endif
|
||||
@@ -974,7 +974,7 @@ static int acpi_sbs_remove(struct acpi_device *device, int type)
|
||||
|
||||
static void acpi_sbs_rmdirs(void)
|
||||
{
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
if (acpi_ac_dir) {
|
||||
acpi_unlock_ac_dir(acpi_ac_dir);
|
||||
acpi_ac_dir = NULL;
|
||||
@@ -1013,7 +1013,7 @@ static int __init acpi_sbs_init(void)
|
||||
|
||||
if (acpi_disabled)
|
||||
return -ENODEV;
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
acpi_ac_dir = acpi_lock_ac_dir();
|
||||
if (!acpi_ac_dir)
|
||||
return -ENODEV;
|
||||
|
Reference in New Issue
Block a user