From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiang Liu Subject: [PATCH v2 4/9] ACPI, DOCK: simplify implementation of dock_create_acpi_device() Date: Thu, 27 Jun 2013 00:30:56 +0800 Message-ID: <1372264261-17442-5-git-send-email-liuj97@gmail.com> References: <1372264261-17442-1-git-send-email-liuj97@gmail.com> Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:34246 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824Ab3FZQdy (ORCPT ); Wed, 26 Jun 2013 12:33:54 -0400 In-Reply-To: <1372264261-17442-1-git-send-email-liuj97@gmail.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J . Wysocki" Cc: liuj97@gmail.com, Jiang Liu , Yijing Wang , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown From: Jiang Liu The return value of dock_create_acpi_device() is not used at all, so change the signature to return void and simplify implementation. Signed-off-by: Jiang Liu Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/acpi/dock.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 8c4214d..22183c4 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -351,10 +351,8 @@ static int dock_present(struct dock_station *ds) * handle if one does not exist already. This should cause * acpi to scan for drivers for the given devices, and call * 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; int ret; @@ -367,10 +365,7 @@ static struct acpi_device * dock_create_acpi_device(acpi_handle handle) ret = acpi_bus_scan(handle); if (ret) pr_debug("error adding bus, %x\n", -ret); - - acpi_bus_get_device(handle, &device); } - return device; } /** -- 1.8.1.2