Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165259
b: refs/heads/master
c: 80f20fe
h: refs/heads/master
i:
  165257: 4411088
  165255: bdbbdbe
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Jun 25, 2009
1 parent c3fe7b9 commit 48b452a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 970b04929a68134acca17878b1d93e115e58c12a
refs/heads/master: 80f20fef6a2381402e59b169eb51b989cc175ab7
40 changes: 14 additions & 26 deletions trunk/drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ MODULE_LICENSE("GPL");

static int acpi_memory_device_add(struct acpi_device *device);
static int acpi_memory_device_remove(struct acpi_device *device, int type);
static int acpi_memory_device_start(struct acpi_device *device);

static const struct acpi_device_id memory_device_ids[] = {
{ACPI_MEMORY_DEVICE_HID, 0},
Expand All @@ -65,7 +64,6 @@ static struct acpi_driver acpi_memory_device_driver = {
.ops = {
.add = acpi_memory_device_add,
.remove = acpi_memory_device_remove,
.start = acpi_memory_device_start,
},
};

Expand Down Expand Up @@ -415,28 +413,6 @@ static int acpi_memory_device_add(struct acpi_device *device)

printk(KERN_DEBUG "%s \n", acpi_device_name(device));

return result;
}

static int acpi_memory_device_remove(struct acpi_device *device, int type)
{
struct acpi_memory_device *mem_device = NULL;


if (!device || !acpi_driver_data(device))
return -EINVAL;

mem_device = acpi_driver_data(device);
kfree(mem_device);

return 0;
}

static int acpi_memory_device_start (struct acpi_device *device)
{
struct acpi_memory_device *mem_device;
int result = 0;

/*
* Early boot code has recognized memory area by EFI/E820.
* If DSDT shows these memory devices on boot, hotplug is not necessary
Expand All @@ -446,8 +422,6 @@ static int acpi_memory_device_start (struct acpi_device *device)
if (!acpi_hotmem_initialized)
return 0;

mem_device = acpi_driver_data(device);

if (!acpi_memory_check_device(mem_device)) {
/* call add_memory func */
result = acpi_memory_enable_device(mem_device);
Expand All @@ -458,6 +432,20 @@ static int acpi_memory_device_start (struct acpi_device *device)
return result;
}

static int acpi_memory_device_remove(struct acpi_device *device, int type)
{
struct acpi_memory_device *mem_device = NULL;


if (!device || !acpi_driver_data(device))
return -EINVAL;

mem_device = acpi_driver_data(device);
kfree(mem_device);

return 0;
}

/*
* Helper function to check for memory device
*/
Expand Down

0 comments on commit 48b452a

Please sign in to comment.