public inbox for linux-kernel@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 v2 10/11] ACPI: video: convert to acpi_get_pci_dev
Date: Wed, 03 Jun 2009 23:59:07 -0600	[thread overview]
Message-ID: <20090604055907.18802.64431.stgit@bob.kio> (raw)
In-Reply-To: <20090604054504.18802.21690.stgit@bob.kio>

Now that acpi_get_pci_dev is available, let's use it instead of
acpi_get_physical_pci_device()

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

 drivers/acpi/video.c        |    6 +++---
 drivers/acpi/video_detect.c |    9 +++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 1bdfb37..5adbf93 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1054,15 +1054,15 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
 static int acpi_video_bus_check(struct acpi_video_bus *video)
 {
 	acpi_status status = -ENOENT;
-	struct device *dev;
+	struct pci_dev *dev;
 
 	if (!video)
 		return -EINVAL;
 
-	dev = acpi_get_physical_pci_device(video->device->handle);
+	dev = acpi_get_pci_dev(video->device->handle);
 	if (!dev)
 		return -ENODEV;
-	put_device(dev);
+	pci_dev_put(dev);
 
 	/* Since there is no HID, CID and so on for VGA driver, we have
 	 * to check well known required nodes.
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 0973727..7cd2b63 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -10,7 +10,7 @@
  * assinged
  *
  * After PCI devices are glued with ACPI devices
- * acpi_get_physical_pci_device() can be called to identify ACPI graphics
+ * acpi_get_pci_dev() can be called to identify ACPI graphics
  * devices for which a real graphics card is plugged in
  *
  * Now acpi_video_get_capabilities() can be called to check which
@@ -36,6 +36,7 @@
 
 #include <linux/acpi.h>
 #include <linux/dmi.h>
+#include <linux/pci.h>
 
 ACPI_MODULE_NAME("video");
 #define _COMPONENT		ACPI_VIDEO_COMPONENT
@@ -109,7 +110,7 @@ static acpi_status
 find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	long *cap = context;
-	struct device *dev;
+	struct pci_dev *dev;
 	struct acpi_device *acpi_dev;
 
 	const struct acpi_device_id video_ids[] = {
@@ -120,10 +121,10 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
 		return AE_OK;
 
 	if (!acpi_match_device_ids(acpi_dev, video_ids)) {
-		dev = acpi_get_physical_pci_device(handle);
+		dev = acpi_get_pci_dev(handle);
 		if (!dev)
 			return AE_OK;
-		put_device(dev);
+		pci_dev_put(dev);
 		*cap |= acpi_is_video_device(acpi_dev);
 	}
 	return AE_OK;


  parent reply	other threads:[~2009-06-04  6:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04  5:58 [PATCH v2 00/11] Dynamic ACPI-PCI binding Alex Chiang
2009-06-04  5:58 ` [PATCH v2 01/11] ACPI: make acpi_pci_bind() static Alex Chiang
2009-06-04  5:58 ` [PATCH v2 02/11] ACPI: Introduce acpi_is_root_bridge() Alex Chiang
2009-06-04  5:58 ` [PATCH v2 03/11] ACPI: Introduce acpi_get_pci_dev() Alex Chiang
2009-06-04  5:58 ` [PATCH v2 04/11] ACPI: eviscerate pci_bind.c Alex Chiang
2009-06-04  5:58 ` [PATCH v2 05/11] ACPI: simplify acpi_pci_irq_add_prt() API Alex Chiang
2009-06-04  5:58 ` [PATCH v2 06/11] ACPI: simplify acpi_pci_irq_del_prt() API Alex Chiang
2009-06-04  5:58 ` [PATCH v2 07/11] ACPI: acpi_pci_unbind should clean up properly after acpi_pci_bind Alex Chiang
2009-06-04  8:42   ` Kenji Kaneshige
2009-06-04 23:35     ` Alex Chiang
2009-06-05 15:49       ` Bjorn Helgaas
2009-06-05 15:59         ` Alex Chiang
2009-06-09 19:14         ` Alex Chiang
2009-06-08  3:23       ` Kenji Kaneshige
2009-06-09 19:09         ` Alex Chiang
2009-06-04  5:58 ` [PATCH v2 08/11] PCI Hotplug: acpiphp: convert to acpi_get_pci_dev Alex Chiang
2009-06-11 21:48   ` Jesse Barnes
2009-06-11 22:17     ` Jesse Barnes
2009-06-04  5:59 ` [PATCH v2 09/11] ACPI: kill acpi_get_pci_id Alex Chiang
2009-06-04  5:59 ` Alex Chiang [this message]
2009-06-04  5:59 ` [PATCH v2 11/11] ACPI: kill acpi_get_physical_pci_device() Alex Chiang

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=20090604055907.18802.64431.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