aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chiang <achiang@hp.com>2009-06-10 15:56:00 -0400
committerLen Brown <len.brown@intel.com>2009-06-17 23:32:23 -0400
commit1e4cffe78e1decd937c7b78410eec87da6b87954 (patch)
tree490fd4c70ec4fd32603456a556cc3268f0b9cf9f
parent80ffdedf6020a77adcd06c01cfe6c488312b28f8 (diff)
ACPI: video: convert to acpi_get_pci_dev
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> Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/video.c6
-rw-r--r--drivers/acpi/video_detect.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 1bdfb37377e3..5adbf9361e60 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)
1054static int acpi_video_bus_check(struct acpi_video_bus *video) 1054static int acpi_video_bus_check(struct acpi_video_bus *video)
1055{ 1055{
1056 acpi_status status = -ENOENT; 1056 acpi_status status = -ENOENT;
1057 struct device *dev; 1057 struct pci_dev *dev;
1058 1058
1059 if (!video) 1059 if (!video)
1060 return -EINVAL; 1060 return -EINVAL;
1061 1061
1062 dev = acpi_get_physical_pci_device(video->device->handle); 1062 dev = acpi_get_pci_dev(video->device->handle);
1063 if (!dev) 1063 if (!dev)
1064 return -ENODEV; 1064 return -ENODEV;
1065 put_device(dev); 1065 pci_dev_put(dev);
1066 1066
1067 /* Since there is no HID, CID and so on for VGA driver, we have 1067 /* Since there is no HID, CID and so on for VGA driver, we have
1068 * to check well known required nodes. 1068 * to check well known required nodes.
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 09737275e25f..7cd2b63435ea 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -10,7 +10,7 @@
10 * assinged 10 * assinged
11 * 11 *
12 * After PCI devices are glued with ACPI devices 12 * After PCI devices are glued with ACPI devices
13 * acpi_get_physical_pci_device() can be called to identify ACPI graphics 13 * acpi_get_pci_dev() can be called to identify ACPI graphics
14 * devices for which a real graphics card is plugged in 14 * devices for which a real graphics card is plugged in
15 * 15 *
16 * Now acpi_video_get_capabilities() can be called to check which 16 * Now acpi_video_get_capabilities() can be called to check which
@@ -36,6 +36,7 @@
36 36
37#include <linux/acpi.h> 37#include <linux/acpi.h>
38#include <linux/dmi.h> 38#include <linux/dmi.h>
39#include <linux/pci.h>
39 40
40ACPI_MODULE_NAME("video"); 41ACPI_MODULE_NAME("video");
41#define _COMPONENT ACPI_VIDEO_COMPONENT 42#define _COMPONENT ACPI_VIDEO_COMPONENT
@@ -109,7 +110,7 @@ static acpi_status
109find_video(acpi_handle handle, u32 lvl, void *context, void **rv) 110find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
110{ 111{
111 long *cap = context; 112 long *cap = context;
112 struct device *dev; 113 struct pci_dev *dev;
113 struct acpi_device *acpi_dev; 114 struct acpi_device *acpi_dev;
114 115
115 const struct acpi_device_id video_ids[] = { 116 const struct acpi_device_id video_ids[] = {
@@ -120,10 +121,10 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
120 return AE_OK; 121 return AE_OK;
121 122
122 if (!acpi_match_device_ids(acpi_dev, video_ids)) { 123 if (!acpi_match_device_ids(acpi_dev, video_ids)) {
123 dev = acpi_get_physical_pci_device(handle); 124 dev = acpi_get_pci_dev(handle);
124 if (!dev) 125 if (!dev)
125 return AE_OK; 126 return AE_OK;
126 put_device(dev); 127 pci_dev_put(dev);
127 *cap |= acpi_is_video_device(acpi_dev); 128 *cap |= acpi_is_video_device(acpi_dev);
128 } 129 }
129 return AE_OK; 130 return AE_OK;