You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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
This commit is contained in:
@@ -695,7 +695,7 @@ static void acpi_battery_quirks(struct acpi_battery *battery)
|
|||||||
if (battery->power_unit && dmi_name_in_vendors("LENOVO")) {
|
if (battery->power_unit && dmi_name_in_vendors("LENOVO")) {
|
||||||
const char *s;
|
const char *s;
|
||||||
s = dmi_get_system_info(DMI_PRODUCT_VERSION);
|
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);
|
dmi_walk(find_battery, battery);
|
||||||
if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH,
|
if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH,
|
||||||
&battery->flags) &&
|
&battery->flags) &&
|
||||||
|
|||||||
+8
-10
@@ -27,12 +27,10 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <asm/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/thermal.h>
|
#include <linux/thermal.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
|
|
||||||
#define PREFIX "ACPI: "
|
|
||||||
|
|
||||||
#define ACPI_FAN_CLASS "fan"
|
#define ACPI_FAN_CLASS "fan"
|
||||||
#define ACPI_FAN_FILE_STATE "state"
|
#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)
|
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);
|
result = acpi_bus_update_power(device->handle, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
printk(KERN_ERR PREFIX "Setting initial power state\n");
|
dev_err(&device->dev, "Setting initial power state\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,10 +167,9 @@ static int acpi_fan_add(struct acpi_device *device)
|
|||||||
&device->dev.kobj,
|
&device->dev.kobj,
|
||||||
"device");
|
"device");
|
||||||
if (result)
|
if (result)
|
||||||
dev_err(&device->dev, "Failed to create sysfs link "
|
dev_err(&device->dev, "Failed to create sysfs link 'device'\n");
|
||||||
"'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),
|
acpi_device_name(device), acpi_device_bid(device),
|
||||||
!device->power.state ? "on" : "off");
|
!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);
|
result = acpi_bus_update_power(to_acpi_device(dev)->handle, NULL);
|
||||||
if (result)
|
if (result)
|
||||||
printk(KERN_ERR PREFIX "Error updating fan power state\n");
|
dev_err(dev, "Error updating fan power state\n");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ static int map_lapic_id(struct acpi_subtable_header *entry,
|
|||||||
u32 acpi_id, int *apic_id)
|
u32 acpi_id, int *apic_id)
|
||||||
{
|
{
|
||||||
struct acpi_madt_local_apic *lapic =
|
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))
|
if (!(lapic->lapic_flags & ACPI_MADT_ENABLED))
|
||||||
return -ENODEV;
|
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)
|
int device_declaration, u32 acpi_id, int *apic_id)
|
||||||
{
|
{
|
||||||
struct acpi_madt_local_x2apic *apic =
|
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))
|
if (!(apic->lapic_flags & ACPI_MADT_ENABLED))
|
||||||
return -ENODEV;
|
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)
|
int device_declaration, u32 acpi_id, int *apic_id)
|
||||||
{
|
{
|
||||||
struct acpi_madt_local_sapic *lsapic =
|
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))
|
if (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|||||||
@@ -661,7 +661,6 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
|
|||||||
* @uuid: UUID of requested functions, should be 16 bytes at least
|
* @uuid: UUID of requested functions, should be 16 bytes at least
|
||||||
* @rev: revision number of requested functions
|
* @rev: revision number of requested functions
|
||||||
* @funcs: bitmap 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
|
* Evaluate device's _DSM method to check whether it supports requested
|
||||||
* functions. Currently only support 64 functions at maximum, should be
|
* functions. Currently only support 64 functions at maximum, should be
|
||||||
|
|||||||
Reference in New Issue
Block a user