summaryrefslogtreecommitdiff
path: root/drivers/acpi/video_detect.c
diff options
context:
space:
mode:
authorAlexander Chiang <achiang@hp.com>2009-06-10 19:56:00 +0000
committerLen Brown <len.brown@intel.com>2009-06-17 23:32:23 -0400
commit1e4cffe78e1decd937c7b78410eec87da6b87954 (patch)
tree490fd4c70ec4fd32603456a556cc3268f0b9cf9f /drivers/acpi/video_detect.c
parent80ffdedf6020a77adcd06c01cfe6c488312b28f8 (diff)
downloadlinux-1e4cffe78e1decd937c7b78410eec87da6b87954.tar.gz
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>
Diffstat (limited to 'drivers/acpi/video_detect.c')
-rw-r--r--drivers/acpi/video_detect.c9
1 files changed, 5 insertions, 4 deletions
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 @@
* 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;