mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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>
This commit is contained in:
parent
ab46feae86
commit
8b12b922ed
1 changed files with 2 additions and 3 deletions
|
@ -530,11 +530,10 @@ static int acpi_device_register(struct acpi_device *device,
|
||||||
if (device->parent)
|
if (device->parent)
|
||||||
device->dev.parent = &parent->dev;
|
device->dev.parent = &parent->dev;
|
||||||
device->dev.bus = &acpi_bus_type;
|
device->dev.bus = &acpi_bus_type;
|
||||||
device_initialize(&device->dev);
|
|
||||||
device->dev.release = &acpi_device_release;
|
device->dev.release = &acpi_device_release;
|
||||||
result = device_add(&device->dev);
|
result = device_register(&device->dev);
|
||||||
if(result) {
|
if(result) {
|
||||||
dev_err(&device->dev, "Error adding device\n");
|
dev_err(&device->dev, "Error registering device\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue