diff options
author | Alex Chiang <achiang@hp.com> | 2009-05-14 10:31:32 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-17 22:57:03 -0400 |
commit | 8b12b922ed5b9b6bfc345d3d6c6de56b2982af7f (patch) | |
tree | 83f827323472200923db46c4b9e5cec8e154e50f /drivers/acpi | |
parent | ab46feae865c5b96dbf5e261be8638165932bfb1 (diff) |
ACPI: acpi_device_register() should call device_register()
There is no apparent reason for acpi_device_register() to manually
register a new device in two steps (initialize then add).
Just call device_register() directly.
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 8ff510b91d88..b8f5c005fbb5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -530,11 +530,10 @@ static int acpi_device_register(struct acpi_device *device, | |||
530 | if (device->parent) | 530 | if (device->parent) |
531 | device->dev.parent = &parent->dev; | 531 | device->dev.parent = &parent->dev; |
532 | device->dev.bus = &acpi_bus_type; | 532 | device->dev.bus = &acpi_bus_type; |
533 | device_initialize(&device->dev); | ||
534 | device->dev.release = &acpi_device_release; | 533 | device->dev.release = &acpi_device_release; |
535 | result = device_add(&device->dev); | 534 | result = device_register(&device->dev); |
536 | if(result) { | 535 | if(result) { |
537 | dev_err(&device->dev, "Error adding device\n"); | 536 | dev_err(&device->dev, "Error registering device\n"); |
538 | goto end; | 537 | goto end; |
539 | } | 538 | } |
540 | 539 | ||