diff options
author | Liu Jinsong <jinsong.liu@intel.com> | 2012-12-16 14:08:41 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-03 13:10:21 +0100 |
commit | 8611ea5f5d708d60ab29ed3cdb33e67168404fc0 (patch) | |
tree | 4a847446cf5b1d3984b2d78aa0acd379d9802220 /drivers | |
parent | ACPI / APEI: Fix the returned value in erst_dbg_read (diff) | |
download | linux-8611ea5f5d708d60ab29ed3cdb33e67168404fc0.tar.xz linux-8611ea5f5d708d60ab29ed3cdb33e67168404fc0.zip |
ACPI / memhotplug: remove redundant logic of acpi memory hotadd
When memory hotadd, acpi_memory_enable_device has already been done
at drv->ops.add (acpi_memory_device_add), no need to do it again
at notify callback.
At acpi_memory_enable_device, acpi_memory_get_device_resources
is also a redundant action, since it has been done at drv->ops.add.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index eb30e5ab4cab..b679bf8478f7 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -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; |