From patchwork Wed Jun 26 16:30:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2787121 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C9F9C9F968 for ; Wed, 26 Jun 2013 16:34:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B723205B8 for ; Wed, 26 Jun 2013 16:34:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EF26205B3 for ; Wed, 26 Jun 2013 16:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607Ab3FZQd6 (ORCPT ); Wed, 26 Jun 2013 12:33:58 -0400 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 Received: by mail-pb0-f46.google.com with SMTP id rq2so14316010pbb.5 for ; Wed, 26 Jun 2013 09:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=d1VNVq9QmVjzqRwgqZCkPeDtOmpKAEa3BF5VBLEjhvQ=; b=yUreSL92mIE+ahSqKs+Y2tUq9kjl4z/gjpdttKjwp7duC6Kehhh9BnE0pYBgrwB61B DEJeogYPZVY08Vn+/BjbuMilCKsxhogY3kUVC9iad2L8ERg9FY6V4Jkk7sm+QZEj2Aso FYmDHKZjquR6GapYZZTC2dF9m5f6/ej19ejLJUtPkBc+UddlGLgeEY74n+gQl6v0Z1Ar V++Xbpd5AcASc6RsLPVy61GKuaftkJUQdhzX9phixA89us9LJ4G6ULIjdJN2deF7QBFX UAwRk1X5OsPx83XYFTnSA2KsBzoLvnqoetXWjpT/BX95xH4wimO+xicUZpuLqyYSu7n4 RtKA== X-Received: by 10.66.144.104 with SMTP id sl8mr1555519pab.9.1372264433628; Wed, 26 Jun 2013 09:33:53 -0700 (PDT) Received: from localhost.localdomain ([114.250.101.234]) by mx.google.com with ESMTPSA id ib9sm28981911pbc.43.2013.06.26.09.33.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 09:33:52 -0700 (PDT) From: Jiang Liu To: "Rafael J . Wysocki" Cc: liuj97@gmail.com, Jiang Liu , Yijing Wang , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown 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> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1372264261-17442-1-git-send-email-liuj97@gmail.com> References: <1372264261-17442-1-git-send-email-liuj97@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; } /**