Skip to content

Commit c18483a

Browse files
guohanjunrafaeljw
authored andcommitted
ACPI: memhotplug: Remove 'state' from struct acpi_memory_device
After commit 315bbae ("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>
1 parent a1b8638 commit c18483a

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

drivers/acpi/acpi_memhotplug.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ static const struct acpi_device_id memory_device_ids[] = {
3636

3737
#ifdef CONFIG_ACPI_HOTPLUG_MEMORY
3838

39-
/* Memory Device States */
40-
#define MEMORY_INVALID_STATE 0
41-
#define MEMORY_POWER_ON_STATE 1
42-
#define MEMORY_POWER_OFF_STATE 2
43-
4439
static int acpi_memory_device_add(struct acpi_device *device,
4540
const struct acpi_device_id *not_used);
4641
static void acpi_memory_device_remove(struct acpi_device *device);
@@ -64,8 +59,7 @@ struct acpi_memory_info {
6459
};
6560

6661
struct acpi_memory_device {
67-
struct acpi_device * device;
68-
unsigned int state; /* State of the memory device */
62+
struct acpi_device *device;
6963
struct list_head res_list;
7064
};
7165

@@ -233,7 +227,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
233227
}
234228
if (!num_enabled) {
235229
dev_err(&mem_device->device->dev, "add_memory failed\n");
236-
mem_device->state = MEMORY_INVALID_STATE;
237230
return -EINVAL;
238231
}
239232
/*
@@ -304,9 +297,6 @@ static int acpi_memory_device_add(struct acpi_device *device,
304297
return result;
305298
}
306299

307-
/* Set the device state */
308-
mem_device->state = MEMORY_POWER_ON_STATE;
309-
310300
result = acpi_memory_check_device(mem_device);
311301
if (result) {
312302
acpi_memory_device_free(mem_device);

0 commit comments

Comments
 (0)