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

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

Merge branch 'acpi-assorted'

* acpi-assorted:
  ACPI / scan: Do not use dummy HID for system bus ACPI nodes
  ACPI / power: Remove useless message from device registering routine
  ACPI / glue: Update DBG macro to include KERN_DEBUG
  ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
  ACPI / memhotplug: remove redundant logic of acpi memory hotadd
  ACPI / APEI: Fix the returned value in erst_dbg_read
parents c49d874b 4f5f64cf
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -226,16 +226,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
	struct acpi_memory_info *info;
	int node;


	/* Get the range from the _CRS */
	result = acpi_memory_get_device_resources(mem_device);
	if (result) {
		dev_err(&mem_device->device->dev,
			"get_device_resources failed\n");
		mem_device->state = MEMORY_INVALID_STATE;
		return result;
	}

	node = acpi_get_node(mem_device->device->handle);
	/*
	 * Tell the VM there is more memory here...
@@ -342,14 +332,6 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
			break;
		}

		if (acpi_memory_check_device(mem_device))
			break;

		if (acpi_memory_enable_device(mem_device)) {
			acpi_handle_err(handle,"Cannot enable memory device\n");
			break;
		}

		ost_code = ACPI_OST_SC_SUCCESS;
		break;

+10 −1
Original line number Diff line number Diff line
@@ -111,8 +111,17 @@ static ssize_t erst_dbg_read(struct file *filp, char __user *ubuf,
	if (rc)
		goto out;
	/* no more record */
	if (id == APEI_ERST_INVALID_RECORD_ID)
	if (id == APEI_ERST_INVALID_RECORD_ID) {
		/*
		 * If the persistent store is empty initially, the function
		 * 'erst_read' below will return "-ENOENT" value. This causes
		 * 'retry_next' label is entered again. The returned value
		 * should be zero indicating the read operation is EOF.
		 */
		len = 0;

		goto out;
	}
retry:
	rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len);
	/* The record may be cleared by others, try read next record */
+1 −2
Original line number Diff line number Diff line
@@ -358,8 +358,7 @@ static struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
	acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
	struct acpi_device *adev;

	return handle && ACPI_SUCCESS(acpi_bus_get_device(handle, &adev)) ?
		adev : NULL;
	return handle && !acpi_bus_get_device(handle, &adev) ? adev : NULL;
}

/**
+7 −2
Original line number Diff line number Diff line
@@ -18,9 +18,14 @@

#define ACPI_GLUE_DEBUG	0
#if ACPI_GLUE_DEBUG
#define DBG(x...) printk(PREFIX x)
#define DBG(fmt, ...)						\
	printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__)
#else
#define DBG(x...) do { } while(0)
#define DBG(fmt, ...)						\
do {								\
	if (0)							\
		printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__);	\
} while (0)
#endif
static LIST_HEAD(bus_type_list);
static DECLARE_RWSEM(bus_type_sem);
+2 −9
Original line number Diff line number Diff line
@@ -445,11 +445,8 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle)
		return -ENODEV;

	ret = acpi_bus_get_device(handle, &acpi_dev);
	if (ret)
		goto no_power_resource;

	if (!acpi_dev->power.flags.power_resources)
		goto no_power_resource;
	if (ret || !acpi_dev->power.flags.power_resources)
		return -ENODEV;

	powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL);
	if (!powered_device)
@@ -471,10 +468,6 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle)
	}

	return ret;

no_power_resource:
	printk(KERN_DEBUG PREFIX "Invalid Power Resource to register!\n");
	return -ENODEV;
}
EXPORT_SYMBOL_GPL(acpi_power_resource_register_device);

Loading