Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1b2dab9 authored by Len Brown's avatar Len Brown
Browse files

Merge branch 'procfs-cleanup' into release

parents 6d1f23f2 6d855fcd
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -232,6 +232,17 @@ Who: Zhang Rui <rui.zhang@intel.com>

---------------------------

What:	CONFIG_ACPI_PROCFS_POWER
When:	2.6.39
Why:	sysfs I/F for ACPI power devices, including AC and Battery,
        has been working in upstream kenrel since 2.6.24, Sep 2007.
	In 2.6.37, we make the sysfs I/F always built in and this option
	disabled by default.
	Remove this option and the ACPI power procfs interface in 2.6.39.
Who:	Zhang Rui <rui.zhang@intel.com>

---------------------------

What:	/proc/acpi/button
When:	August 2007
Why:	/proc/acpi/button has been replaced by events to the input layer
+2 −4
Original line number Diff line number Diff line
@@ -53,10 +53,6 @@ config ACPI_PROCFS
	  they have been replaced by functions in /sys.
	  The deprecated files (and their replacements) include:

	  /proc/acpi/processor/*/throttling (/sys/class/thermal/
		cooling_device*/*)
	  /proc/acpi/video/*/brightness (/sys/class/backlight/)
	  /proc/acpi/thermal_zone/*/* (/sys/class/thermal/)
	  This option has no effect on /proc/acpi/ files
	  and functions which do not yet exist in /sys.

@@ -74,6 +70,8 @@ config ACPI_PROCFS_POWER
	  /proc/acpi/ac_adapter/* (sys/class/power_supply/*)
	  This option has no effect on /proc/acpi/ directories
	  and functions, which do not yet exist in /sys
	  This option, together with the proc directories, will be
	  deleted in 2.6.39.

	  Say N to delete power /proc/acpi/ directories that have moved to /sys/

+2 −1
Original line number Diff line number Diff line
@@ -197,7 +197,8 @@ static int acpi_ac_add_fs(struct acpi_device *device)
{
	struct proc_dir_entry *entry = NULL;


	printk(KERN_WARNING PREFIX "Deprecated procfs I/F for AC is loaded,"
			" please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
	if (!acpi_device_dir(device)) {
		acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
						     acpi_ac_dir);
+2 −0
Original line number Diff line number Diff line
@@ -868,6 +868,8 @@ static int acpi_battery_add_fs(struct acpi_device *device)
	struct proc_dir_entry *entry = NULL;
	int i;

	printk(KERN_WARNING PREFIX "Deprecated procfs I/F for battery is loaded,"
			" please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
	if (!acpi_device_dir(device)) {
		acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
						     acpi_battery_dir);
+1 −74
Original line number Diff line number Diff line
@@ -40,10 +40,6 @@
#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>
@@ -246,53 +242,6 @@ 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)
{
	struct proc_dir_entry *entry = NULL;


	if (!acpi_device_dir(device)) {
		acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
						     acpi_processor_dir);
		if (!acpi_device_dir(device))
			return -ENODEV;
	}

	/* 'throttling' [R/W] */
	entry = proc_create_data(ACPI_PROCESSOR_FILE_THROTTLING,
				 S_IFREG | S_IRUGO | S_IWUSR,
				 acpi_device_dir(device),
				 &acpi_processor_throttling_fops,
				 acpi_driver_data(device));
	if (!entry)
		return -EIO;
	return 0;
}
static int acpi_processor_remove_fs(struct acpi_device *device)
{

	if (acpi_device_dir(device)) {
		remove_proc_entry(ACPI_PROCESSOR_FILE_THROTTLING,
				  acpi_device_dir(device));
		remove_proc_entry(acpi_device_bid(device), acpi_processor_dir);
		acpi_device_dir(device) = NULL;
	}

	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
   -------------------------------------------------------------------------- */
@@ -537,14 +486,10 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)

	per_cpu(processors, pr->id) = pr;

	result = acpi_processor_add_fs(device);
	if (result)
		goto err_free_cpumask;

	sysdev = get_cpu_sysdev(pr->id);
	if (sysfs_create_link(&device->dev.kobj, &sysdev->kobj, "sysdev")) {
		result = -EFAULT;
		goto err_remove_fs;
		goto err_free_cpumask;
	}

#ifdef CONFIG_CPU_FREQ
@@ -590,8 +535,6 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
	thermal_cooling_device_unregister(pr->cdev);
err_power_exit:
	acpi_processor_power_exit(pr, device);
err_remove_fs:
	acpi_processor_remove_fs(device);
err_free_cpumask:
	free_cpumask_var(pr->throttling.shared_cpu_map);

@@ -620,8 +563,6 @@ static int acpi_processor_remove(struct acpi_device *device, int type)

	sysfs_remove_link(&device->dev.kobj, "sysdev");

	acpi_processor_remove_fs(device);

	if (pr->cdev) {
		sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
		sysfs_remove_link(&pr->cdev->device.kobj, "device");
@@ -854,12 +795,6 @@ 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",
			acpi_idle_driver.name);
@@ -885,10 +820,6 @@ 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;
}

@@ -907,10 +838,6 @@ 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;
}

Loading