linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: "Rafael J . Wysocki" <rjw@sisk.pl>
Cc: liuj97@gmail.com, Jiang Liu <jiang.liu@huawei.com>,
	Yijing Wang <wangyijing@huawei.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Len Brown <lenb@kernel.org>
Subject: [PATCH v2 4/9] ACPI, DOCK: simplify implementation of dock_create_acpi_device()
Date: Thu, 27 Jun 2013 00:30:56 +0800	[thread overview]
Message-ID: <1372264261-17442-5-git-send-email-liuj97@gmail.com> (raw)
In-Reply-To: <1372264261-17442-1-git-send-email-liuj97@gmail.com>

From: Jiang Liu <jiang.liu@huawei.com>

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 <jiang.liu@huawei.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
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


  parent reply	other threads:[~2013-06-26 16:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 16:30 [PATCH v2 0/9] minor improvements for ACPI dock and acpiphp drivers Jiang Liu
2013-06-26 16:30 ` [PATCH v2 1/9] ACPI, DOCK: avoid initializing acpi_dock_notifier_list multiple times Jiang Liu
2013-06-26 16:30 ` [PATCH v2 2/9] ACPI, DOCK: kill redundant spin lock in dock station object Jiang Liu
2013-06-26 16:30 ` [PATCH v2 3/9] ACPI, DOCK: mark initialization functions with __init Jiang Liu
2013-06-26 16:30 ` Jiang Liu [this message]
2013-06-26 16:30 ` [PATCH v2 5/9] ACPI: introduce three helper functions Jiang Liu
2013-06-26 18:49   ` Rafael J. Wysocki
2013-06-26 23:46     ` Rafael J. Wysocki
2013-06-26 16:30 ` [PATCH v2 6/9] ACPI: change acpi_[bay|dock]_match() in scan.c as global functions Jiang Liu
2013-06-26 16:30 ` [PATCH v2 7/9] ACPI: simplify dock driver with new interfaces Jiang Liu
2013-06-26 23:12   ` Bjorn Helgaas
2013-06-26 16:31 ` [PATCH v2 8/9] ACPI: simpilify scan.c " Jiang Liu
2013-06-26 16:31 ` [PATCH v2 9/9] ACPI: simplify acpiphp driver " Jiang Liu
2013-06-26 18:34 ` [PATCH v2 0/9] minor improvements for ACPI dock and acpiphp drivers Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372264261-17442-5-git-send-email-liuj97@gmail.com \
    --to=liuj97@gmail.com \
    --cc=jiang.liu@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=wangyijing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).