ACPICA: Fix two Scope type error messages
[safe/jmp/linux-2.6] / drivers / acpi / video_detect.c
index 0973727..8c1b431 100644 (file)
@@ -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,9 @@
 
 #include <linux/acpi.h>
 #include <linux/dmi.h>
+#include <linux/pci.h>
+
+#define PREFIX "ACPI: "
 
 ACPI_MODULE_NAME("video");
 #define _COMPONENT             ACPI_VIDEO_COMPONENT
@@ -81,7 +84,7 @@ long acpi_is_video_device(struct acpi_device *device)
                return 0;
 
        /* Does this device able to support video switching ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) &&
+       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) ||
            ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
                video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING;
 
@@ -98,7 +101,7 @@ long acpi_is_video_device(struct acpi_device *device)
        /* Only check for backlight functionality if one of the above hit. */
        if (video_caps)
                acpi_walk_namespace(ACPI_TYPE_DEVICE, device->handle,
-                                   ACPI_UINT32_MAX, acpi_backlight_cap_match,
+                                   ACPI_UINT32_MAX, acpi_backlight_cap_match, NULL,
                                    &video_caps, NULL);
 
        return video_caps;
@@ -109,7 +112,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 +123,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;
@@ -148,7 +151,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
        if (!graphics_handle) {
                /* Only do the global walk through all graphics devices once */
                acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-                                   ACPI_UINT32_MAX, find_video,
+                                   ACPI_UINT32_MAX, find_video, NULL,
                                    &caps, NULL);
                /* There might be boot param flags set already... */
                acpi_video_support |= caps;
@@ -170,7 +173,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
                        return 0;
                }
                acpi_walk_namespace(ACPI_TYPE_DEVICE, graphics_handle,
-                                   ACPI_UINT32_MAX, find_video,
+                                   ACPI_UINT32_MAX, find_video, NULL,
                                    &caps, NULL);
        }
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "We have 0x%lX video support %s %s\n",