diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-12-20 18:36:47 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-03 07:09:39 -0500 |
commit | 636458de36f1fb4cdd318387d2f45604e451b17a (patch) | |
tree | 484db3b8ea7d4d9cba63422654d790880908a1b6 /drivers/acpi/dock.c | |
parent | 02f57c67a8677ae55dcdd256a2a7abaf41e4cc1f (diff) |
ACPI: Remove the arguments of acpi_bus_add() that are not used
Notice that acpi_bus_add() uses only 2 of its 4 arguments and
redefine its header to match the body. Update all of its callers as
necessary and observe that this leads to quite a number of removed
lines of code (Linus will like that).
Add a kerneldoc comment documenting acpi_bus_add() and wonder how
its callers make wrong assumptions about the second argument (make
note to self to take care of that later).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index f32bd47b35e0..ff30582d2e1d 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -310,8 +310,6 @@ static int dock_present(struct dock_station *ds) | |||
310 | static struct acpi_device * dock_create_acpi_device(acpi_handle handle) | 310 | static struct acpi_device * dock_create_acpi_device(acpi_handle handle) |
311 | { | 311 | { |
312 | struct acpi_device *device; | 312 | struct acpi_device *device; |
313 | struct acpi_device *parent_device; | ||
314 | acpi_handle parent; | ||
315 | int ret; | 313 | int ret; |
316 | 314 | ||
317 | if (acpi_bus_get_device(handle, &device)) { | 315 | if (acpi_bus_get_device(handle, &device)) { |
@@ -319,16 +317,9 @@ static struct acpi_device * dock_create_acpi_device(acpi_handle handle) | |||
319 | * no device created for this object, | 317 | * no device created for this object, |
320 | * so we should create one. | 318 | * so we should create one. |
321 | */ | 319 | */ |
322 | acpi_get_parent(handle, &parent); | 320 | ret = acpi_bus_add(handle, &device); |
323 | if (acpi_bus_get_device(parent, &parent_device)) | 321 | if (ret) |
324 | parent_device = NULL; | ||
325 | |||
326 | ret = acpi_bus_add(&device, parent_device, handle, | ||
327 | ACPI_BUS_TYPE_DEVICE); | ||
328 | if (ret) { | ||
329 | pr_debug("error adding bus, %x\n", -ret); | 322 | pr_debug("error adding bus, %x\n", -ret); |
330 | return NULL; | ||
331 | } | ||
332 | } | 323 | } |
333 | return device; | 324 | return device; |
334 | } | 325 | } |