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

Commit 0f0c8aa0 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'acpi-assorted' into linux-next

* acpi-assorted:
  PCI / ACPI: Don't query OSC support with all possible controls
  ACPI / processor_thermal: avoid null pointer deference error
  ACPI / fan: avoid null pointer deference error
  ACPI / video: Fix applying indexed initial brightness value.
  ACPI / video: Make logic a little easier to understand.
  ACPI / video: Fix brightness control initialization for some laptops.
  ACPI: Use resource_size() in osl.c
  ACPI / acpi_pad: Used PTR_RET
  ACPI: suppress compiler warning in container.c
  ACPI: suppress compiler warning in battery.c
  ACPI: suppress compiler warnings in processor_throttling.c
  ACPI: suppress compiler warnings in button.c
  ACPI: replace kmalloc+memcpy with kmemdup
  ACPI: Remove acpi_pci_bind_root() definition
  ACPI video: ignore BIOS backlight value for HP dm4
parents 077f893b 545d6e18
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -236,7 +236,7 @@ static int create_power_saving_task(void)
	ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread,
	ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread,
		(void *)(unsigned long)ps_tsk_num,
		(void *)(unsigned long)ps_tsk_num,
		"acpi_pad/%d", ps_tsk_num);
		"acpi_pad/%d", ps_tsk_num);
	rc = IS_ERR(ps_tsks[ps_tsk_num]) ? PTR_ERR(ps_tsks[ps_tsk_num]) : 0;
	rc = PTR_RET(ps_tsks[ps_tsk_num]);
	if (!rc)
	if (!rc)
		ps_tsk_num++;
		ps_tsk_num++;
	else
	else
+1 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ struct acpi_battery {


#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat)
#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat)


inline int acpi_battery_present(struct acpi_battery *battery)
static inline int acpi_battery_present(struct acpi_battery *battery)
{
{
	return battery->device->status.battery_present;
	return battery->device->status.battery_present;
}
}
+2 −3
Original line number Original line Diff line number Diff line
@@ -288,13 +288,12 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
	}
	}
out_success:
out_success:
	context->ret.length = out_obj->buffer.length;
	context->ret.length = out_obj->buffer.length;
	context->ret.pointer = kmalloc(context->ret.length, GFP_KERNEL);
	context->ret.pointer = kmemdup(out_obj->buffer.pointer,
				       context->ret.length, GFP_KERNEL);
	if (!context->ret.pointer) {
	if (!context->ret.pointer) {
		status =  AE_NO_MEMORY;
		status =  AE_NO_MEMORY;
		goto out_kfree;
		goto out_kfree;
	}
	}
	memcpy(context->ret.pointer, out_obj->buffer.pointer,
		context->ret.length);
	status =  AE_OK;
	status =  AE_OK;


out_kfree:
out_kfree:
+1 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include <acpi/acpi_drivers.h>
#include <acpi/button.h>


#define PREFIX "ACPI: "
#define PREFIX "ACPI: "


+2 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,8 @@


#include "internal.h"
#include "internal.h"


#include "internal.h"

#define PREFIX "ACPI: "
#define PREFIX "ACPI: "


#define _COMPONENT			ACPI_CONTAINER_COMPONENT
#define _COMPONENT			ACPI_CONTAINER_COMPONENT
Loading