Commit 8be2362d authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-extlog', 'acpi-memhotplug', 'acpi-button', 'acpi-tools' and 'acpi-pci'

* acpi-extlog:
  ACPI / extlog: Check for RDMSR failure

* acpi-memhotplug:
  ACPI: memhotplug: Remove 'state' from struct acpi_memory_device

* acpi-button:
  ACPI: button: fix handling lid state changes when input device closed

* acpi-tools:
  tools/power/acpi: Serialize Makefile

* acpi-pci:
  ACPI: PCI: update kernel-doc line comments
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -222,9 +222,9 @@ static int __init extlog_init(void)
	u64 cap;
	int rc;

	rdmsrl(MSR_IA32_MCG_CAP, cap);

	if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr())
	if (rdmsrl_safe(MSR_IA32_MCG_CAP, &cap) ||
	    !(cap & MCG_ELOG_P) ||
	    !extlog_get_l1addr())
		return -ENODEV;

	rc = -EINVAL;
+1 −11
Original line number Diff line number Diff line
@@ -29,11 +29,6 @@ static const struct acpi_device_id memory_device_ids[] = {

#ifdef CONFIG_ACPI_HOTPLUG_MEMORY

/* Memory Device States */
#define MEMORY_INVALID_STATE	0
#define MEMORY_POWER_ON_STATE	1
#define MEMORY_POWER_OFF_STATE	2

static int acpi_memory_device_add(struct acpi_device *device,
				  const struct acpi_device_id *not_used);
static void acpi_memory_device_remove(struct acpi_device *device);
@@ -58,7 +53,6 @@ struct acpi_memory_info {

struct acpi_memory_device {
	struct acpi_device *device;
	unsigned int state;	/* State of the memory device */
	struct list_head res_list;
};

@@ -226,7 +220,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
	}
	if (!num_enabled) {
		dev_err(&mem_device->device->dev, "add_memory failed\n");
		mem_device->state = MEMORY_INVALID_STATE;
		return -EINVAL;
	}
	/*
@@ -297,9 +290,6 @@ static int acpi_memory_device_add(struct acpi_device *device,
		return result;
	}

	/* Set the device state */
	mem_device->state = MEMORY_POWER_ON_STATE;

	result = acpi_memory_check_device(mem_device);
	if (result) {
		acpi_memory_device_free(mem_device);
+7 −6
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ struct acpi_button {
	int last_state;
	ktime_t last_time;
	bool suspended;
	bool lid_state_initialized;
};

static struct acpi_device *lid_device;
@@ -383,6 +384,8 @@ static int acpi_lid_update_state(struct acpi_device *device,

static void acpi_lid_initialize_state(struct acpi_device *device)
{
	struct acpi_button *button = acpi_driver_data(device);

	switch (lid_init_state) {
	case ACPI_BUTTON_LID_INIT_OPEN:
		(void)acpi_lid_notify_state(device, 1);
@@ -394,13 +397,14 @@ static void acpi_lid_initialize_state(struct acpi_device *device)
	default:
		break;
	}

	button->lid_state_initialized = true;
}

static void acpi_button_notify(struct acpi_device *device, u32 event)
{
	struct acpi_button *button = acpi_driver_data(device);
	struct input_dev *input;
	int users;

	switch (event) {
	case ACPI_FIXED_HARDWARE_EVENT:
@@ -409,10 +413,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
	case ACPI_BUTTON_NOTIFY_STATUS:
		input = button->input;
		if (button->type == ACPI_BUTTON_TYPE_LID) {
			mutex_lock(&button->input->mutex);
			users = button->input->users;
			mutex_unlock(&button->input->mutex);
			if (users)
			if (button->lid_state_initialized)
				acpi_lid_update_state(device, true);
		} else {
			int keycode;
@@ -457,7 +458,7 @@ static int acpi_button_resume(struct device *dev)
	struct acpi_button *button = acpi_driver_data(device);

	button->suspended = false;
	if (button->type == ACPI_BUTTON_TYPE_LID && button->input->users) {
	if (button->type == ACPI_BUTTON_TYPE_LID) {
		button->last_state = !!acpi_lid_evaluate_state(device);
		button->last_time = ktime_get();
		acpi_lid_initialize_state(device);
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static DEFINE_MUTEX(osc_lock);

/**
 * acpi_is_root_bridge - determine whether an ACPI CA node is a PCI root bridge
 * @handle - the ACPI CA node in question.
 * @handle:  the ACPI CA node in question.
 *
 * Note: we could make this API take a struct acpi_device * instead, but
 * for now, it's more convenient to operate on an acpi_handle.
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@

include ../../scripts/Makefile.include

.NOTPARALLEL:

all: acpidbg acpidump ec
clean: acpidbg_clean acpidump_clean ec_clean
install: acpidbg_install acpidump_install ec_install