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

Commit 963c6527 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (28 commits)
  ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOS
  ACPI: thermal: create "thermal.act=" to disable or override active trip point
  ACPI: thermal: create "thermal.nocrt" to disable critical actions
  ACPI: thermal: create "thermal.psv=" to override passive trip points
  ACPI: thermal: expose "thermal.tzp=" to set global polling frequency
  ACPI: thermal: create "thermal.off=1" to disable ACPI thermal support
  ACPI: thinkpad-acpi: fix sysfs paths in documentation
  ACPI: static
  ACPI EC: remove potential deadlock from EC
  ACPI: dock: Send key=value pair instead of plain value
  ACPI: bay: send envp with uevent - fix
  acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues
  ACPI: fix "Time Problems with 2.6.23-rc1-gf695baf2"
  ACPI: thinkpad-acpi: change thinkpad-acpi input default and kconfig help
  ACPI: EC: fix run-together printk lines
  ACPI: sbs: remove dead code
  ACPI: EC: acpi_ec_remove(): fix use-after-free
  ACPI: EC: Switch from boot_ec as soon as we find its desc in DSDT.
  ACPI: EC: fix build warning
  ACPI: EC: If ECDT is not found, look up EC in DSDT.
  ...
parents c1502e28 4e54e9f4
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -163,6 +163,8 @@ and is between 256 and 4096 characters. It is defined in the file
	acpi_irq_isa=	[HW,ACPI] If irq_balance, mark listed IRQs used by ISA
			Format: <irq>,<irq>...

	acpi_no_auto_ssdt	[HW,ACPI] Disable automatic loading of SSDT

	acpi_os_name=	[HW,ACPI] Tell ACPI BIOS the name of the OS
			Format: To spoof as Windows 98: ="Microsoft Windows"

@@ -1820,6 +1822,26 @@ and is between 256 and 4096 characters. It is defined in the file
	thash_entries=	[KNL,NET]
			Set number of hash buckets for TCP connection

	thermal.act=	[HW,ACPI]
			-1: disable all active trip points in all thermal zones
			<degrees C>: override all lowest active trip points

	thermal.nocrt=	[HW,ACPI]
			Set to disable actions on ACPI thermal zone
			critical and hot trip points.

	thermal.off=	[HW,ACPI]
			1: disable ACPI thermal control

	thermal.psv=	[HW,ACPI]
			-1: disable all passive trip points
			<degrees C>: override all passive trip points to this value

	thermal.tzp=	[HW,ACPI]
			Specify global default ACPI thermal zone polling rate
			<deci-seconds>: poll all this frequency
			0: no polling (default)

	time		Show timing data prefixed to each printk message line
			[deprecated, see 'printk.time']

+2 −2
Original line number Diff line number Diff line
@@ -105,10 +105,10 @@ The version of thinkpad-acpi's sysfs interface is exported by the driver
as a driver attribute (see below).

Sysfs driver attributes are on the driver's sysfs attribute space,
for 2.6.20 this is /sys/bus/platform/drivers/thinkpad-acpi/.
for 2.6.20 this is /sys/bus/platform/drivers/thinkpad_acpi/.

Sysfs device attributes are on the driver's sysfs attribute space,
for 2.6.20 this is /sys/devices/platform/thinkpad-acpi/.
for 2.6.20 this is /sys/devices/platform/thinkpad_acpi/.

Driver version
--------------
+15 −26
Original line number Diff line number Diff line
@@ -68,7 +68,8 @@ struct acpi_cpufreq_data {
};

static struct acpi_cpufreq_data *drv_data[NR_CPUS];
static struct acpi_processor_performance *acpi_perf_data[NR_CPUS];
/* acpi_perf_data is a pointer to percpu data. */
static struct acpi_processor_performance *acpi_perf_data;

static struct cpufreq_driver acpi_cpufreq_driver;

@@ -508,25 +509,15 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu)
 * do _PDC and _PSD and find out the processor dependency for the
 * actual init that will happen later...
 */
static int acpi_cpufreq_early_init(void)
static int __init acpi_cpufreq_early_init(void)
{
	struct acpi_processor_performance *data;
	unsigned int i, j;

	dprintk("acpi_cpufreq_early_init\n");

	for_each_possible_cpu(i) {
		data = kzalloc(sizeof(struct acpi_processor_performance),
			       GFP_KERNEL);
		if (!data) {
			for_each_possible_cpu(j) {
				kfree(acpi_perf_data[j]);
				acpi_perf_data[j] = NULL;
			}
	acpi_perf_data = alloc_percpu(struct acpi_processor_performance);
	if (!acpi_perf_data) {
		dprintk("Memory allocation error for acpi_perf_data.\n");
		return -ENOMEM;
	}
		acpi_perf_data[i] = data;
	}

	/* Do initialization in ACPI core */
	acpi_processor_preregister_performance(acpi_perf_data);
@@ -574,14 +565,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)

	dprintk("acpi_cpufreq_cpu_init\n");

	if (!acpi_perf_data[cpu])
		return -ENODEV;

	data = kzalloc(sizeof(struct acpi_cpufreq_data), GFP_KERNEL);
	if (!data)
		return -ENOMEM;

	data->acpi_data = acpi_perf_data[cpu];
	data->acpi_data = percpu_ptr(acpi_perf_data, cpu);
	drv_data[cpu] = data;

	if (cpu_has(c, X86_FEATURE_CONSTANT_TSC))
@@ -778,24 +766,25 @@ static struct cpufreq_driver acpi_cpufreq_driver = {

static int __init acpi_cpufreq_init(void)
{
	int ret;

	dprintk("acpi_cpufreq_init\n");

	acpi_cpufreq_early_init();
	ret = acpi_cpufreq_early_init();
	if (ret)
		return ret;

	return cpufreq_register_driver(&acpi_cpufreq_driver);
}

static void __exit acpi_cpufreq_exit(void)
{
	unsigned int i;
	dprintk("acpi_cpufreq_exit\n");

	cpufreq_unregister_driver(&acpi_cpufreq_driver);

	for_each_possible_cpu(i) {
		kfree(acpi_perf_data[i]);
		acpi_perf_data[i] = NULL;
	}
	free_percpu(acpi_perf_data);

	return;
}

+1 −0
Original line number Diff line number Diff line
@@ -1192,6 +1192,7 @@ static int asus_hotk_get_info(void)
			break;
		default:
			kfree(model);
			model = NULL;
			break;
		}
	}
+17 −30
Original line number Diff line number Diff line
@@ -129,13 +129,14 @@ struct acpi_battery_flags {
};

struct acpi_battery {
	struct mutex mutex;
	struct acpi_device *device;
	struct acpi_battery_flags flags;
	struct acpi_buffer bif_data;
	struct acpi_buffer bst_data;
	struct mutex lock;
	unsigned long alarm;
	unsigned long update_time[ACPI_BATTERY_NUMFILES];

};

inline int acpi_battery_present(struct acpi_battery *battery)
@@ -235,10 +236,10 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
		return 0;

	/* Evaluate _BIF */

	status =
	    acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL,
				 &buffer);
	mutex_lock(&battery->lock);
	status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF",
				      NULL, &buffer);
	mutex_unlock(&battery->lock);
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
		return -ENODEV;
@@ -285,10 +286,10 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
		return 0;

	/* Evaluate _BST */

	status =
	    acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL,
				 &buffer);
	mutex_lock(&battery->lock);
	status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST",
				      NULL, &buffer);
	mutex_unlock(&battery->lock);
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
		return -ENODEV;
@@ -336,9 +337,10 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery,

	arg0.integer.value = alarm;

	status =
	    acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
	mutex_lock(&battery->lock);
	status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
				 &arg_list, NULL);
	mutex_unlock(&battery->lock);
	if (ACPI_FAILURE(status))
		return -ENODEV;

@@ -658,8 +660,6 @@ acpi_battery_write_alarm(struct file *file,
	if (!battery || (count > sizeof(alarm_string) - 1))
		return -EINVAL;

	mutex_lock(&battery->mutex);

	result = acpi_battery_update(battery, 1, &update_result);
	if (result) {
		result = -ENODEV;
@@ -688,9 +688,7 @@ acpi_battery_write_alarm(struct file *file,
	acpi_battery_check_result(battery, result);

	if (!result)
		result = count;

	mutex_unlock(&battery->mutex);
		return count;

	return result;
}
@@ -714,8 +712,6 @@ static int acpi_battery_read(int fid, struct seq_file *seq)
	int update_result = ACPI_BATTERY_NONE_UPDATE;
	int update = 0;

	mutex_lock(&battery->mutex);

	update = (get_seconds() - battery->update_time[fid] >= update_time);
	update = (update | battery->flags.update[fid]);

@@ -733,7 +729,6 @@ static int acpi_battery_read(int fid, struct seq_file *seq)
	result = acpi_read_funcs[fid].print(seq, result);
	acpi_battery_check_result(battery, result);
	battery->flags.update[fid] = result;
	mutex_unlock(&battery->mutex);
	return result;
}

@@ -897,10 +892,7 @@ static int acpi_battery_add(struct acpi_device *device)
	if (!battery)
		return -ENOMEM;

	mutex_init(&battery->mutex);

	mutex_lock(&battery->mutex);

	mutex_init(&battery->lock);
	battery->device = device;
	strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME);
	strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS);
@@ -936,7 +928,6 @@ static int acpi_battery_add(struct acpi_device *device)
		kfree(battery);
	}

	mutex_unlock(&battery->mutex);

	return result;
}
@@ -951,8 +942,6 @@ static int acpi_battery_remove(struct acpi_device *device, int type)

	battery = acpi_driver_data(device);

	mutex_lock(&battery->mutex);

	status = acpi_remove_notify_handler(device->handle,
					    ACPI_ALL_NOTIFY,
					    acpi_battery_notify);
@@ -963,9 +952,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)

	kfree(battery->bst_data.pointer);

	mutex_unlock(&battery->mutex);

	mutex_destroy(&battery->mutex);
	mutex_destroy(&battery->lock);

	kfree(battery);

Loading