提交 8b12b922 编写于 作者: A Alex Chiang 提交者: Len Brown

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: NAlex Chiang <achiang@hp.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 ab46feae
......@@ -530,11 +530,10 @@ static int acpi_device_register(struct acpi_device *device,
if (device->parent)
device->dev.parent = &parent->dev;
device->dev.bus = &acpi_bus_type;
device_initialize(&device->dev);
device->dev.release = &acpi_device_release;
result = device_add(&device->dev);
result = device_register(&device->dev);
if(result) {
dev_err(&device->dev, "Error adding device\n");
dev_err(&device->dev, "Error registering device\n");
goto end;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册