diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-12-21 03:36:47 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-03 16:09:39 +0400 |
commit | 636458de36f1fb4cdd318387d2f45604e451b17a (patch) | |
tree | 484db3b8ea7d4d9cba63422654d790880908a1b6 /drivers/acpi/container.c | |
parent | 02f57c67a8677ae55dcdd256a2a7abaf41e4cc1f (diff) | |
download | linux-636458de36f1fb4cdd318387d2f45604e451b17a.tar.xz |
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/container.c')
-rw-r--r-- | drivers/acpi/container.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 98b85e3e4781..0688f83bc436 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c @@ -135,20 +135,6 @@ static int acpi_container_remove(struct acpi_device *device, int type) return status; } -static int container_device_add(struct acpi_device **device, acpi_handle handle) -{ - acpi_handle phandle; - struct acpi_device *pdev; - - if (acpi_get_parent(handle, &phandle)) - return -ENODEV; - - if (acpi_bus_get_device(phandle, &pdev)) - return -ENODEV; - - return acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE); -} - static void container_notify_cb(acpi_handle handle, u32 type, void *context) { struct acpi_device *device = NULL; @@ -180,7 +166,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context) if (!ACPI_FAILURE(status) || device) break; - result = container_device_add(&device, handle); + result = acpi_bus_add(handle, &device); if (result) { acpi_handle_warn(handle, "Failed to add container\n"); break; |