From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Aaron Lu <aaron.lu@intel.com>, Toshi Kani <toshi.kani@hp.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-ide@vger.kernel.org, linux-usb@vger.kernel.org,
Lan Tianyu <tianyu.lan@intel.com>
Subject: [PATCH 3/3] ACPI / bind: Move acpi_get_child() to drivers/ide/ide-acpi.c
Date: Fri, 29 Nov 2013 01:39:06 +0100 [thread overview]
Message-ID: <2277225.7ruX4XHWxe@vostro.rjw.lan> (raw)
In-Reply-To: <4501334.ovACrGogrl@vostro.rjw.lan>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Since drivers/ide/ide-acpi.c is the only remaining user of
acpi_get_child(), move that function into that file as a static
routine.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/glue.c | 12 ------------
drivers/ide/ide-acpi.c | 11 +++++++++++
include/acpi/acpi_bus.h | 1 -
3 files changed, 11 insertions(+), 13 deletions(-)
Index: linux-pm/drivers/acpi/glue.c
===================================================================
--- linux-pm.orig/drivers/acpi/glue.c
+++ linux-pm/drivers/acpi/glue.c
@@ -151,18 +151,6 @@ struct acpi_device *acpi_find_child_devi
}
EXPORT_SYMBOL_GPL(acpi_find_child_device);
-acpi_handle acpi_get_child(acpi_handle handle, u64 addr)
-{
- struct acpi_device *adev;
-
- if (!handle || acpi_bus_get_device(handle, &adev))
- return NULL;
-
- adev = acpi_find_child_device(adev, addr, false);
- return adev ? adev->handle : NULL;
-}
-EXPORT_SYMBOL_GPL(acpi_get_child);
-
static void acpi_physnode_link_name(char *buf, unsigned int node_id)
{
if (node_id > 0)
Index: linux-pm/drivers/ide/ide-acpi.c
===================================================================
--- linux-pm.orig/drivers/ide/ide-acpi.c
+++ linux-pm/drivers/ide/ide-acpi.c
@@ -98,6 +98,17 @@ bool ide_port_acpi(ide_hwif_t *hwif)
return ide_noacpi == 0 && hwif->acpidata;
}
+static acpi_handle acpi_get_child(acpi_handle handle, u64 addr)
+{
+ struct acpi_device *adev;
+
+ if (!handle || acpi_bus_get_device(handle, &adev))
+ return NULL;
+
+ adev = acpi_find_child_device(adev, addr, false);
+ return adev ? adev->handle : NULL;
+}
+
/**
* ide_get_dev_handle - finds acpi_handle and PCI device.function
* @dev: device to locate
Index: linux-pm/include/acpi/acpi_bus.h
===================================================================
--- linux-pm.orig/include/acpi/acpi_bus.h
+++ linux-pm/include/acpi/acpi_bus.h
@@ -436,7 +436,6 @@ struct acpi_pci_root {
struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
u64 address, bool check_children);
-acpi_handle acpi_get_child(acpi_handle handle, u64 addr);
int acpi_is_root_bridge(acpi_handle);
struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
next prev parent reply other threads:[~2013-11-29 0:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 0:36 [PATCH 0/3] ACPI / bind: Use struct acpi_device pointers instead of ACPI handles Rafael J. Wysocki
2013-11-29 0:37 ` [PATCH 1/3] ACPI / bind: Rework struct acpi_bus_type Rafael J. Wysocki
2013-11-29 1:55 ` Lan Tianyu
2013-11-29 12:19 ` Rafael J. Wysocki
2013-11-29 0:38 ` [PATCH 2/3] ACPI / bind: Pass struct acpi_device pointer to acpi_bind_one() Rafael J. Wysocki
2013-11-29 0:39 ` Rafael J. Wysocki [this message]
2013-11-29 2:11 ` [PATCH 0/3] ACPI / bind: Use struct acpi_device pointers instead of ACPI handles Lan Tianyu
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=2277225.7ruX4XHWxe@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=aaron.lu@intel.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tianyu.lan@intel.com \
--cc=toshi.kani@hp.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).