From patchwork Fri Jun 28 16:24:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2800131 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2D53DBF4A1 for ; Fri, 28 Jun 2013 16:29:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B32920223 for ; Fri, 28 Jun 2013 16:29:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26568201FD for ; Fri, 28 Jun 2013 16:29:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755698Ab3F1Q32 (ORCPT ); Fri, 28 Jun 2013 12:29:28 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:56746 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755701Ab3F1Q1T (ORCPT ); Fri, 28 Jun 2013 12:27:19 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf11so2612515pab.38 for ; Fri, 28 Jun 2013 09:27:18 -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=SsSfQXkS2LjYC4cW0L6ZZyj6SiXby5wjA5oARBSbOdKttZqAy40jEyiF5RDjdPEyHj uwdbVrQzLgz8klynf7HChJL8Bnvcsb+L2/MCfCDqUUFppzM/ly/2DB4rKEX2M1gVQcdh zO2RGS+0CJbVgo7T7WyCFgceQxW9nC65GYiVJcalhJ34Rz5IcTmv/28PY1l42XVjfth2 g8FYAswq3sAxmIDQMkYMPhU+MEr9vbC423Lzkb+xQII4m3YBOcn9o27PzWc/3oG4KAka UdBRDs4bltHY2fpjfueXsNGuKjdbgni5yWSqWOxSbNIzf/IRBelofU3rux5Ba7D0kwoU kS6w== X-Received: by 10.67.2.71 with SMTP id bm7mr12016915pad.144.1372436838558; Fri, 28 Jun 2013 09:27:18 -0700 (PDT) Received: from localhost.localdomain ([114.250.94.88]) by mx.google.com with ESMTPSA id jf4sm8827948pbb.19.2013.06.28.09.27.14 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Jun 2013 09:27:17 -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 v3 04/10] ACPI, DOCK: simplify implementation of dock_create_acpi_device() Date: Sat, 29 Jun 2013 00:24:37 +0800 Message-Id: <1372436683-31711-5-git-send-email-liuj97@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1372436683-31711-1-git-send-email-liuj97@gmail.com> References: <1372436683-31711-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=unavailable 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; } /**