public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Renninger <trenn@suse.de>,
	linux-pci@vger.kernel.org
Subject: [PATCH v3 12/12] ACPI: kill acpi_get_physical_pci_device()
Date: Wed, 10 Jun 2009 13:56:05 -0600	[thread overview]
Message-ID: <20090610195605.28982.44680.stgit@bob.kio> (raw)
In-Reply-To: <20090610194714.28982.51363.stgit@bob.kio>

acpi_get_pci_dev() is (hopefully) better, and all callers have been
converted, so let's get rid of this duplicated functionality.

Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Alex Chiang <achiang@hp.com>
---

 drivers/acpi/glue.c     |   40 ----------------------------------------
 include/acpi/acpi_bus.h |    1 -
 2 files changed, 0 insertions(+), 41 deletions(-)

diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 8bd2c2a..a8a5c29 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -140,46 +140,6 @@ struct device *acpi_get_physical_device(acpi_handle handle)
 
 EXPORT_SYMBOL(acpi_get_physical_device);
 
-/* ToDo: When a PCI bridge is found, return the PCI device behind the bridge
- *       This should work in general, but did not on a Lenovo T61 for the
- *	 graphics card. But this must be fixed when the PCI device is
- *       bound and the kernel device struct is attached to the acpi device
- * Note: A success call will increase reference count by one
- *       Do call put_device(dev) on the returned device then
- */
-struct device *acpi_get_physical_pci_device(acpi_handle handle)
-{
-	struct device *dev;
-	long long device_id;
-	acpi_status status;
-
-	status =
-		acpi_evaluate_integer(handle, "_ADR", NULL, &device_id);
-
-	if (ACPI_FAILURE(status))
-		return NULL;
-
-	/* We need to attempt to determine whether the _ADR refers to a
-	   PCI device or not. There's no terribly good way to do this,
-	   so the best we can hope for is to assume that there'll never
-	   be a device in the host bridge */
-	if (device_id >= 0x10000) {
-		/* It looks like a PCI device. Does it exist? */
-		dev = acpi_get_physical_device(handle);
-	} else {
-		/* It doesn't look like a PCI device. Does its parent
-		   exist? */
-		acpi_handle phandle;
-		if (acpi_get_parent(handle, &phandle))
-			return NULL;
-		dev = acpi_get_physical_device(phandle);
-	}
-	if (!dev)
-		return NULL;
-	return dev;
-}
-EXPORT_SYMBOL(acpi_get_physical_pci_device);
-
 static int acpi_bind_one(struct device *dev, acpi_handle handle)
 {
 	struct acpi_device *acpi_dev;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 494088b..c65e4ce 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -368,7 +368,6 @@ struct acpi_bus_type {
 int register_acpi_bus_type(struct acpi_bus_type *);
 int unregister_acpi_bus_type(struct acpi_bus_type *);
 struct device *acpi_get_physical_device(acpi_handle);
-struct device *acpi_get_physical_pci_device(acpi_handle);
 
 /* helper */
 acpi_handle acpi_get_child(acpi_handle, acpi_integer);

  parent reply	other threads:[~2009-06-10 19:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 19:55 [PATCH v3 00/12] Dynamic ACPI-PCI binding Alex Chiang
2009-06-10 19:55 ` [PATCH v3 01/12] ACPI: make acpi_pci_bind() static Alex Chiang
2009-06-10 19:55 ` [PATCH v3 02/12] ACPI: Introduce acpi_is_root_bridge() Alex Chiang
2009-06-10 19:55 ` [PATCH v3 03/12] ACPI: Introduce acpi_get_pci_dev() Alex Chiang
2009-06-10 19:55 ` [PATCH v3 04/12] ACPI: rearrange acpi_pci_bind/acpi_pci_unbind in pci_bind.c Alex Chiang
2009-06-10 19:55 ` [PATCH v3 05/12] ACPI: eviscerate pci_bind.c Alex Chiang
2009-06-10 19:55 ` [PATCH v3 06/12] ACPI: simplify acpi_pci_irq_add_prt() API Alex Chiang
2009-06-10 19:55 ` [PATCH v3 07/12] ACPI: simplify acpi_pci_irq_del_prt() API Alex Chiang
2009-06-10 19:55 ` [PATCH v3 08/12] ACPI: acpi_pci_unbind should clean up properly after acpi_pci_bind Alex Chiang
2009-06-10 19:55 ` [PATCH v3 09/12] PCI Hotplug: acpiphp: convert to acpi_get_pci_dev Alex Chiang
2009-06-10 19:55 ` [PATCH v3 10/12] ACPI: kill acpi_get_pci_id Alex Chiang
2009-06-10 19:56 ` [PATCH v3 11/12] ACPI: video: convert to acpi_get_pci_dev Alex Chiang
2009-06-25 22:38   ` Alex Riesen
2009-06-25 23:05     ` Alex Chiang
2009-06-26  6:43       ` Troy Moure
2009-06-26 10:56       ` Alex Riesen
2009-06-26 12:28         ` Alex Riesen
2009-06-26 19:19           ` Jesse Barnes
2009-06-26 19:28             ` Alex Chiang
2009-06-10 19:56 ` Alex Chiang [this message]
2009-06-11 19:22 ` [PATCH v3 00/12] Dynamic ACPI-PCI binding Bjorn Helgaas
2009-06-18  3:36   ` Len Brown

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=20090610195605.28982.44680.stgit@bob.kio \
    --to=achiang@hp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=trenn@suse.de \
    /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