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

Commit e82ca043 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: (44 commits)
  ACPI: remove function tracing macros from drivers/acpi/*.c
  ACPI: add support for Smart Battery
  ACPI: handle battery notify event on broken BIOS
  ACPI: handle AC notify event on broken BIOS
  ACPI: asus_acpi: add S1N WLED control
  ACPI: asus_acpi: correct M6N/M6R display nodes
  ACPI: asus_acpi: add S1N WLED control
  ACPI: asus_acpi: rework model detection
  ACPI: asus_acpi: support L5D
  ACPI: asus_acpi: handle internal Bluetooth / support W5A
  ACPI: asus_acpi: support A4G
  ACPI: asus_acpi: support W3400N
  ACPI: asus_acpi: LED display support
  ACPI: asus_acpi: support A3G
  ACPI: asus_acpi: misc cleanups
  ACPI: video: Remove unneeded acpi_handle from driver.
  ACPI: thermal: Remove unneeded acpi_handle from driver.
  ACPI: power: Remove unneeded acpi_handle from driver.
  ACPI: pci_root: Remove unneeded acpi_handle from driver.
  ACPI: pci_link: Remove unneeded acpi_handle from driver.
  ...
parents 075395d2 309b0f12
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ static acpi_status hp_ccsr_locate(acpi_handle obj, u64 *base, u64 *length)
	memcpy(length, vendor->byte_data + 8, sizeof(*length));
	memcpy(length, vendor->byte_data + 8, sizeof(*length));


  exit:
  exit:
	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);
	return status;
	return status;
}
}


+6 −6
Original line number Original line Diff line number Diff line
@@ -856,7 +856,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
	obj = buffer.pointer;
	obj = buffer.pointer;
	if (obj->type != ACPI_TYPE_BUFFER ||
	if (obj->type != ACPI_TYPE_BUFFER ||
	    obj->buffer.length < sizeof(*lsapic)) {
	    obj->buffer.length < sizeof(*lsapic)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return -EINVAL;
		return -EINVAL;
	}
	}


@@ -864,13 +864,13 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)


	if ((lsapic->header.type != ACPI_MADT_LSAPIC) ||
	if ((lsapic->header.type != ACPI_MADT_LSAPIC) ||
	    (!lsapic->flags.enabled)) {
	    (!lsapic->flags.enabled)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return -EINVAL;
		return -EINVAL;
	}
	}


	physid = ((lsapic->id << 8) | (lsapic->eid));
	physid = ((lsapic->id << 8) | (lsapic->eid));


	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);
	buffer.length = ACPI_ALLOCATE_BUFFER;
	buffer.length = ACPI_ALLOCATE_BUFFER;
	buffer.pointer = NULL;
	buffer.pointer = NULL;


@@ -934,20 +934,20 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
	obj = buffer.pointer;
	obj = buffer.pointer;
	if (obj->type != ACPI_TYPE_BUFFER ||
	if (obj->type != ACPI_TYPE_BUFFER ||
	    obj->buffer.length < sizeof(*iosapic)) {
	    obj->buffer.length < sizeof(*iosapic)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return AE_OK;
		return AE_OK;
	}
	}


	iosapic = (struct acpi_table_iosapic *)obj->buffer.pointer;
	iosapic = (struct acpi_table_iosapic *)obj->buffer.pointer;


	if (iosapic->header.type != ACPI_MADT_IOSAPIC) {
	if (iosapic->header.type != ACPI_MADT_IOSAPIC) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return AE_OK;
		return AE_OK;
	}
	}


	gsi_base = iosapic->global_irq_base;
	gsi_base = iosapic->global_irq_base;


	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);


	/*
	/*
	 * OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell
	 * OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell
+12 −0
Original line number Original line Diff line number Diff line
@@ -352,6 +352,18 @@ config ACPI_HOTPLUG_MEMORY
	  If one selects "m," this driver can be loaded using the following
	  If one selects "m," this driver can be loaded using the following
	  command: 
	  command: 
		$>modprobe acpi_memhotplug 
		$>modprobe acpi_memhotplug 

config ACPI_SBS
	tristate "Smart Battery System (EXPERIMENTAL)"
	depends on X86 && I2C
	depends on EXPERIMENTAL
	default y
	help
	  This driver adds support for the Smart Battery System.
	  Depends on I2C (Device Drivers ---> I2C support)
	  A "Smart Battery" is quite old and quite rare compared
	  to today's ACPI "Control Method" battery.

endif	# ACPI
endif	# ACPI


endmenu
endmenu
+2 −0
Original line number Original line Diff line number Diff line
@@ -58,3 +58,5 @@ obj-$(CONFIG_ACPI_IBM) += ibm_acpi.o
obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o
obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o
obj-y				+= scan.o motherboard.o
obj-y				+= scan.o motherboard.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)	+= acpi_memhotplug.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)	+= acpi_memhotplug.o
obj-y				+= cm_sbs.o
obj-$(CONFIG_ACPI_SBS)		+= i2c_ec.o sbs.o
+17 −15
Original line number Original line Diff line number Diff line
@@ -50,6 +50,9 @@ ACPI_MODULE_NAME("acpi_ac")
MODULE_DESCRIPTION(ACPI_AC_DRIVER_NAME);
MODULE_DESCRIPTION(ACPI_AC_DRIVER_NAME);
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");


extern struct proc_dir_entry *acpi_lock_ac_dir(void);
extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);

static int acpi_ac_add(struct acpi_device *device);
static int acpi_ac_add(struct acpi_device *device);
static int acpi_ac_remove(struct acpi_device *device, int type);
static int acpi_ac_remove(struct acpi_device *device, int type);
static int acpi_ac_open_fs(struct inode *inode, struct file *file);
static int acpi_ac_open_fs(struct inode *inode, struct file *file);
@@ -65,7 +68,7 @@ static struct acpi_driver acpi_ac_driver = {
};
};


struct acpi_ac {
struct acpi_ac {
	acpi_handle handle;
	struct acpi_device * device;
	unsigned long state;
	unsigned long state;
};
};


@@ -88,7 +91,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
	if (!ac)
	if (!ac)
		return -EINVAL;
		return -EINVAL;


	status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state);
	status = acpi_evaluate_integer(ac->device->handle, "_PSR", NULL, &ac->state);
	if (ACPI_FAILURE(status)) {
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
		ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
		ac->state = ACPI_AC_STATUS_UNKNOWN;
		ac->state = ACPI_AC_STATUS_UNKNOWN;
@@ -191,11 +194,11 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
	if (!ac)
	if (!ac)
		return;
		return;


	if (acpi_bus_get_device(ac->handle, &device))
	device = ac->device;
		return;

	switch (event) {
	switch (event) {
	case ACPI_AC_NOTIFY_STATUS:
	case ACPI_AC_NOTIFY_STATUS:
	case ACPI_NOTIFY_BUS_CHECK:
	case ACPI_NOTIFY_DEVICE_CHECK:
		acpi_ac_get_state(ac);
		acpi_ac_get_state(ac);
		acpi_bus_generate_event(device, event, (u32) ac->state);
		acpi_bus_generate_event(device, event, (u32) ac->state);
		break;
		break;
@@ -223,7 +226,7 @@ static int acpi_ac_add(struct acpi_device *device)
		return -ENOMEM;
		return -ENOMEM;
	memset(ac, 0, sizeof(struct acpi_ac));
	memset(ac, 0, sizeof(struct acpi_ac));


	ac->handle = device->handle;
	ac->device = device;
	strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);
	strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);
	strcpy(acpi_device_class(device), ACPI_AC_CLASS);
	strcpy(acpi_device_class(device), ACPI_AC_CLASS);
	acpi_driver_data(device) = ac;
	acpi_driver_data(device) = ac;
@@ -236,8 +239,8 @@ static int acpi_ac_add(struct acpi_device *device)
	if (result)
	if (result)
		goto end;
		goto end;


	status = acpi_install_notify_handler(ac->handle,
	status = acpi_install_notify_handler(device->handle,
					     ACPI_DEVICE_NOTIFY, acpi_ac_notify,
					     ACPI_ALL_NOTIFY, acpi_ac_notify,
					     ac);
					     ac);
	if (ACPI_FAILURE(status)) {
	if (ACPI_FAILURE(status)) {
		result = -ENODEV;
		result = -ENODEV;
@@ -268,8 +271,8 @@ static int acpi_ac_remove(struct acpi_device *device, int type)


	ac = (struct acpi_ac *)acpi_driver_data(device);
	ac = (struct acpi_ac *)acpi_driver_data(device);


	status = acpi_remove_notify_handler(ac->handle,
	status = acpi_remove_notify_handler(device->handle,
					    ACPI_DEVICE_NOTIFY, acpi_ac_notify);
					    ACPI_ALL_NOTIFY, acpi_ac_notify);


	acpi_ac_remove_fs(device);
	acpi_ac_remove_fs(device);


@@ -280,17 +283,16 @@ static int acpi_ac_remove(struct acpi_device *device, int type)


static int __init acpi_ac_init(void)
static int __init acpi_ac_init(void)
{
{
	int result = 0;
	int result;




	acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
	acpi_ac_dir = acpi_lock_ac_dir();
	if (!acpi_ac_dir)
	if (!acpi_ac_dir)
		return -ENODEV;
		return -ENODEV;
	acpi_ac_dir->owner = THIS_MODULE;


	result = acpi_bus_register_driver(&acpi_ac_driver);
	result = acpi_bus_register_driver(&acpi_ac_driver);
	if (result < 0) {
	if (result < 0) {
		remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
		acpi_unlock_ac_dir(acpi_ac_dir);
		return -ENODEV;
		return -ENODEV;
	}
	}


@@ -302,7 +304,7 @@ static void __exit acpi_ac_exit(void)


	acpi_bus_unregister_driver(&acpi_ac_driver);
	acpi_bus_unregister_driver(&acpi_ac_driver);


	remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
	acpi_unlock_ac_dir(acpi_ac_dir);


	return;
	return;
}
}
Loading