aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_memhotplug.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-09-19 01:56:39 -0400
committerLen Brown <len.brown@intel.com>2009-09-19 01:56:39 -0400
commit3b87bb640e77023c97cf209e3dd85887a1113ad0 (patch)
treec4531d2c954bcc28706837cc67a8865677e51fbf /drivers/acpi/acpi_memhotplug.c
parent7a92d803227a523a9a5546e4e0dce1325a4b5926 (diff)
parentdcf52fb71d988ba945054308f661bddf9b2455fb (diff)
Merge branch 'bjorn-start-stop-2.6.32' into release
Diffstat (limited to 'drivers/acpi/acpi_memhotplug.c')
-rw-r--r--drivers/acpi/acpi_memhotplug.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 80eacbe157e2..28ccdbc05ac8 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -53,7 +53,6 @@ MODULE_LICENSE("GPL");
53 53
54static int acpi_memory_device_add(struct acpi_device *device); 54static int acpi_memory_device_add(struct acpi_device *device);
55static int acpi_memory_device_remove(struct acpi_device *device, int type); 55static int acpi_memory_device_remove(struct acpi_device *device, int type);
56static int acpi_memory_device_start(struct acpi_device *device);
57 56
58static const struct acpi_device_id memory_device_ids[] = { 57static const struct acpi_device_id memory_device_ids[] = {
59 {ACPI_MEMORY_DEVICE_HID, 0}, 58 {ACPI_MEMORY_DEVICE_HID, 0},
@@ -68,7 +67,6 @@ static struct acpi_driver acpi_memory_device_driver = {
68 .ops = { 67 .ops = {
69 .add = acpi_memory_device_add, 68 .add = acpi_memory_device_add,
70 .remove = acpi_memory_device_remove, 69 .remove = acpi_memory_device_remove,
71 .start = acpi_memory_device_start,
72 }, 70 },
73}; 71};
74 72
@@ -431,28 +429,6 @@ static int acpi_memory_device_add(struct acpi_device *device)
431 429
432 printk(KERN_DEBUG "%s \n", acpi_device_name(device)); 430 printk(KERN_DEBUG "%s \n", acpi_device_name(device));
433 431
434 return result;
435}
436
437static int acpi_memory_device_remove(struct acpi_device *device, int type)
438{
439 struct acpi_memory_device *mem_device = NULL;
440
441
442 if (!device || !acpi_driver_data(device))
443 return -EINVAL;
444
445 mem_device = acpi_driver_data(device);
446 kfree(mem_device);
447
448 return 0;
449}
450
451static int acpi_memory_device_start (struct acpi_device *device)
452{
453 struct acpi_memory_device *mem_device;
454 int result = 0;
455
456 /* 432 /*
457 * Early boot code has recognized memory area by EFI/E820. 433 * Early boot code has recognized memory area by EFI/E820.
458 * If DSDT shows these memory devices on boot, hotplug is not necessary 434 * If DSDT shows these memory devices on boot, hotplug is not necessary
@@ -462,8 +438,6 @@ static int acpi_memory_device_start (struct acpi_device *device)
462 if (!acpi_hotmem_initialized) 438 if (!acpi_hotmem_initialized)
463 return 0; 439 return 0;
464 440
465 mem_device = acpi_driver_data(device);
466
467 if (!acpi_memory_check_device(mem_device)) { 441 if (!acpi_memory_check_device(mem_device)) {
468 /* call add_memory func */ 442 /* call add_memory func */
469 result = acpi_memory_enable_device(mem_device); 443 result = acpi_memory_enable_device(mem_device);
@@ -474,6 +448,20 @@ static int acpi_memory_device_start (struct acpi_device *device)
474 return result; 448 return result;
475} 449}
476 450
451static int acpi_memory_device_remove(struct acpi_device *device, int type)
452{
453 struct acpi_memory_device *mem_device = NULL;
454
455
456 if (!device || !acpi_driver_data(device))
457 return -EINVAL;
458
459 mem_device = acpi_driver_data(device);
460 kfree(mem_device);
461
462 return 0;
463}
464
477/* 465/*
478 * Helper function to check for memory device 466 * Helper function to check for memory device
479 */ 467 */