Commit 1e765cd3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-processor', 'acpi-battery', 'acpi-utils' and 'acpi-fan'

* acpi-processor:
  ACPI / processor: use container_of instead of casting first structure member

* acpi-battery:
  ACPI / battery: Replace strnicmp with strncasecmp

* acpi-utils:
  ACPI / utils: Update acpi_check_dsm() comments

* acpi-fan:
  ACPI / fan: printk replacement
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ static void acpi_battery_quirks(struct acpi_battery *battery)
	if (battery->power_unit && dmi_name_in_vendors("LENOVO")) {
		const char *s;
		s = dmi_get_system_info(DMI_PRODUCT_VERSION);
		if (s && !strnicmp(s, "ThinkPad", 8)) {
		if (s && !strncasecmp(s, "ThinkPad", 8)) {
			dmi_walk(find_battery, battery);
			if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH,
				     &battery->flags) &&
+8 −10
Original line number Diff line number Diff line
@@ -27,12 +27,10 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <asm/uaccess.h>
#include <linux/uaccess.h>
#include <linux/thermal.h>
#include <linux/acpi.h>

#define PREFIX "ACPI: "

#define ACPI_FAN_CLASS			"fan"
#define ACPI_FAN_FILE_STATE		"state"

@@ -127,8 +125,9 @@ static const struct thermal_cooling_device_ops fan_cooling_ops = {
};

/* --------------------------------------------------------------------------
                                 Driver Interface
   -------------------------------------------------------------------------- */
 *                               Driver Interface
 * --------------------------------------------------------------------------
*/

static int acpi_fan_add(struct acpi_device *device)
{
@@ -143,7 +142,7 @@ static int acpi_fan_add(struct acpi_device *device)

	result = acpi_bus_update_power(device->handle, NULL);
	if (result) {
		printk(KERN_ERR PREFIX "Setting initial power state\n");
		dev_err(&device->dev, "Setting initial power state\n");
		goto end;
	}

@@ -168,10 +167,9 @@ static int acpi_fan_add(struct acpi_device *device)
				   &device->dev.kobj,
				   "device");
	if (result)
		dev_err(&device->dev, "Failed to create sysfs link "
			"'device'\n");
		dev_err(&device->dev, "Failed to create sysfs link 'device'\n");

	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
	dev_info(&device->dev, "ACPI: %s [%s] (%s)\n",
	       acpi_device_name(device), acpi_device_bid(device),
	       !device->power.state ? "on" : "off");

@@ -217,7 +215,7 @@ static int acpi_fan_resume(struct device *dev)

	result = acpi_bus_update_power(to_acpi_device(dev)->handle, NULL);
	if (result)
		printk(KERN_ERR PREFIX "Error updating fan power state\n");
		dev_err(dev, "Error updating fan power state\n");

	return result;
}
+3 −3
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ static int map_lapic_id(struct acpi_subtable_header *entry,
		 u32 acpi_id, int *apic_id)
{
	struct acpi_madt_local_apic *lapic =
		(struct acpi_madt_local_apic *)entry;
		container_of(entry, struct acpi_madt_local_apic, header);

	if (!(lapic->lapic_flags & ACPI_MADT_ENABLED))
		return -ENODEV;
@@ -32,7 +32,7 @@ static int map_x2apic_id(struct acpi_subtable_header *entry,
			 int device_declaration, u32 acpi_id, int *apic_id)
{
	struct acpi_madt_local_x2apic *apic =
		(struct acpi_madt_local_x2apic *)entry;
		container_of(entry, struct acpi_madt_local_x2apic, header);

	if (!(apic->lapic_flags & ACPI_MADT_ENABLED))
		return -ENODEV;
@@ -49,7 +49,7 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
		int device_declaration, u32 acpi_id, int *apic_id)
{
	struct acpi_madt_local_sapic *lsapic =
		(struct acpi_madt_local_sapic *)entry;
		container_of(entry, struct acpi_madt_local_sapic, header);

	if (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))
		return -ENODEV;
+0 −1
Original line number Diff line number Diff line
@@ -661,7 +661,6 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
 * @uuid: UUID of requested functions, should be 16 bytes at least
 * @rev: revision number of requested functions
 * @funcs: bitmap of requested functions
 * @exclude: excluding special value, used to support i915 and nouveau
 *
 * Evaluate device's _DSM method to check whether it supports requested
 * functions. Currently only support 64 functions at maximum, should be