aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_memhotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpi_memhotplug.c')
-rw-r--r--drivers/acpi/acpi_memhotplug.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 84a68965c11a..81e970adeab3 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -80,7 +80,7 @@ struct acpi_memory_info {
80}; 80};
81 81
82struct acpi_memory_device { 82struct acpi_memory_device {
83 acpi_handle handle; 83 struct acpi_device * device;
84 unsigned int state; /* State of the memory device */ 84 unsigned int state; /* State of the memory device */
85 struct list_head res_list; 85 struct list_head res_list;
86}; 86};
@@ -129,7 +129,7 @@ acpi_memory_get_device_resources(struct acpi_memory_device *mem_device)
129 struct acpi_memory_info *info, *n; 129 struct acpi_memory_info *info, *n;
130 130
131 131
132 status = acpi_walk_resources(mem_device->handle, METHOD_NAME__CRS, 132 status = acpi_walk_resources(mem_device->device->handle, METHOD_NAME__CRS,
133 acpi_memory_get_resource, mem_device); 133 acpi_memory_get_resource, mem_device);
134 if (ACPI_FAILURE(status)) { 134 if (ACPI_FAILURE(status)) {
135 list_for_each_entry_safe(info, n, &mem_device->res_list, list) 135 list_for_each_entry_safe(info, n, &mem_device->res_list, list)
@@ -192,7 +192,7 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
192 192
193 193
194 /* Get device present/absent information from the _STA */ 194 /* Get device present/absent information from the _STA */
195 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->handle, "_STA", 195 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA",
196 NULL, &current_status))) 196 NULL, &current_status)))
197 return -ENODEV; 197 return -ENODEV;
198 /* 198 /*
@@ -222,7 +222,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
222 return result; 222 return result;
223 } 223 }
224 224
225 node = acpi_get_node(mem_device->handle); 225 node = acpi_get_node(mem_device->device->handle);
226 /* 226 /*
227 * Tell the VM there is more memory here... 227 * Tell the VM there is more memory here...
228 * Note: Assume that this function returns zero on success 228 * Note: Assume that this function returns zero on success
@@ -269,7 +269,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
269 arg_list.pointer = &arg; 269 arg_list.pointer = &arg;
270 arg.type = ACPI_TYPE_INTEGER; 270 arg.type = ACPI_TYPE_INTEGER;
271 arg.integer.value = 1; 271 arg.integer.value = 1;
272 status = acpi_evaluate_object(mem_device->handle, 272 status = acpi_evaluate_object(mem_device->device->handle,
273 "_EJ0", &arg_list, NULL); 273 "_EJ0", &arg_list, NULL);
274 /* Return on _EJ0 failure */ 274 /* Return on _EJ0 failure */
275 if (ACPI_FAILURE(status)) { 275 if (ACPI_FAILURE(status)) {
@@ -278,7 +278,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
278 } 278 }
279 279
280 /* Evalute _STA to check if the device is disabled */ 280 /* Evalute _STA to check if the device is disabled */
281 status = acpi_evaluate_integer(mem_device->handle, "_STA", 281 status = acpi_evaluate_integer(mem_device->device->handle, "_STA",
282 NULL, &current_status); 282 NULL, &current_status);
283 if (ACPI_FAILURE(status)) 283 if (ACPI_FAILURE(status))
284 return -ENODEV; 284 return -ENODEV;
@@ -398,7 +398,7 @@ static int acpi_memory_device_add(struct acpi_device *device)
398 memset(mem_device, 0, sizeof(struct acpi_memory_device)); 398 memset(mem_device, 0, sizeof(struct acpi_memory_device));
399 399
400 INIT_LIST_HEAD(&mem_device->res_list); 400 INIT_LIST_HEAD(&mem_device->res_list);
401 mem_device->handle = device->handle; 401 mem_device->device = device;
402 sprintf(acpi_device_name(device), "%s", ACPI_MEMORY_DEVICE_NAME); 402 sprintf(acpi_device_name(device), "%s", ACPI_MEMORY_DEVICE_NAME);
403 sprintf(acpi_device_class(device), "%s", ACPI_MEMORY_DEVICE_CLASS); 403 sprintf(acpi_device_class(device), "%s", ACPI_MEMORY_DEVICE_CLASS);
404 acpi_driver_data(device) = mem_device; 404 acpi_driver_data(device) = mem_device;