diff options
author | Hanjun Guo <guohanjun@huawei.com> | 2020-09-27 17:55:49 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-10-02 19:05:50 +0200 |
commit | c18483a8ed30712630bc91bb9ea035cc9e1dfef0 (patch) | |
tree | dad9bed4b08eca60872cf58e6e11a4007a61e1fe /drivers/acpi | |
parent | a1b8638ba1320e6684aa98233c15255eb803fac7 (diff) |
ACPI: memhotplug: Remove 'state' from struct acpi_memory_device
After commit 315bbae9c5cb ("ACPI / memhotplug: deal with eject request
in hotplug queue"), the memory device state, which is defined in
struct acpi_memory_device, is not actually useful, so remove it along
with symbols related to it.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index e294f44a7850..468ebb706913 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -36,11 +36,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); @@ -64,8 +59,7 @@ struct acpi_memory_info { }; struct acpi_memory_device { - struct acpi_device * device; - unsigned int state; /* State of the memory device */ + struct acpi_device *device; struct list_head res_list; }; @@ -233,7 +227,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; } /* @@ -304,9 +297,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); |