aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpi_memhotplug.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 1486e03bb41a..3721f8dd0de3 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -57,6 +57,7 @@ MODULE_LICENSE("GPL");
57 57
58static int acpi_memory_device_add(struct acpi_device *device); 58static int acpi_memory_device_add(struct acpi_device *device);
59static int acpi_memory_device_remove(struct acpi_device *device, int type); 59static int acpi_memory_device_remove(struct acpi_device *device, int type);
60static int acpi_memory_device_start(struct acpi_device *device);
60 61
61static struct acpi_driver acpi_memory_device_driver = { 62static struct acpi_driver acpi_memory_device_driver = {
62 .name = ACPI_MEMORY_DEVICE_DRIVER_NAME, 63 .name = ACPI_MEMORY_DEVICE_DRIVER_NAME,
@@ -65,6 +66,7 @@ static struct acpi_driver acpi_memory_device_driver = {
65 .ops = { 66 .ops = {
66 .add = acpi_memory_device_add, 67 .add = acpi_memory_device_add,
67 .remove = acpi_memory_device_remove, 68 .remove = acpi_memory_device_remove,
69 .start = acpi_memory_device_start,
68 }, 70 },
69}; 71};
70 72
@@ -433,6 +435,25 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type)
433 return_VALUE(0); 435 return_VALUE(0);
434} 436}
435 437
438static int acpi_memory_device_start (struct acpi_device *device)
439{
440 struct acpi_memory_device *mem_device;
441 int result = 0;
442
443 ACPI_FUNCTION_TRACE("acpi_memory_device_start");
444
445 mem_device = acpi_driver_data(device);
446
447 if (!acpi_memory_check_device(mem_device)) {
448 /* call add_memory func */
449 result = acpi_memory_enable_device(mem_device);
450 if (result)
451 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
452 "Error in acpi_memory_enable_device\n"));
453 }
454 return_VALUE(result);
455}
456
436/* 457/*
437 * Helper function to check for memory device 458 * Helper function to check for memory device
438 */ 459 */