Commit 472d963b authored by Jiang Liu's avatar Jiang Liu Committed by Rafael J. Wysocki

ACPI / dock: simplify dock_create_acpi_device()

The return value of dock_create_acpi_device() is not used at all,
so change its signature to return void and simplify the
implementation of it.
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d423c083
...@@ -351,10 +351,8 @@ static int dock_present(struct dock_station *ds) ...@@ -351,10 +351,8 @@ static int dock_present(struct dock_station *ds)
* handle if one does not exist already. This should cause * handle if one does not exist already. This should cause
* acpi to scan for drivers for the given devices, and call * acpi to scan for drivers for the given devices, and call
* matching driver's add routine. * matching driver's add routine.
*
* Returns a pointer to the acpi_device corresponding to the handle.
*/ */
static struct acpi_device * dock_create_acpi_device(acpi_handle handle) static void dock_create_acpi_device(acpi_handle handle)
{ {
struct acpi_device *device; struct acpi_device *device;
int ret; int ret;
...@@ -367,10 +365,7 @@ static struct acpi_device * dock_create_acpi_device(acpi_handle handle) ...@@ -367,10 +365,7 @@ static struct acpi_device * dock_create_acpi_device(acpi_handle handle)
ret = acpi_bus_scan(handle); ret = acpi_bus_scan(handle);
if (ret) if (ret)
pr_debug("error adding bus, %x\n", -ret); pr_debug("error adding bus, %x\n", -ret);
acpi_bus_get_device(handle, &device);
} }
return device;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment