ACPI / APEI: fix error return code in ghes_probe()
[linux-3.10.git] / drivers / acpi / video_detect.c
index 4ac2593..e6bd910 100644 (file)
@@ -67,40 +67,37 @@ acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
        return 0;
 }
 
-/* Returns true if the device is a video device which can be handled by
- * video.ko.
+/* Returns true if the ACPI object is a video device which can be
+ * handled by video.ko.
  * The device will get a Linux specific CID added in scan.c to
  * identify the device as an ACPI graphics device
  * Be aware that the graphics device may not be physically present
  * Use acpi_video_get_capabilities() to detect general ACPI video
  * capabilities of present cards
  */
-long acpi_is_video_device(struct acpi_device *device)
+long acpi_is_video_device(acpi_handle handle)
 {
        acpi_handle h_dummy;
        long video_caps = 0;
 
-       if (!device)
-               return 0;
-
        /* Is this device able to support video switching ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) ||
-           ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
+       if (ACPI_SUCCESS(acpi_get_handle(handle, "_DOD", &h_dummy)) ||
+           ACPI_SUCCESS(acpi_get_handle(handle, "_DOS", &h_dummy)))
                video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING;
 
        /* Is this device able to retrieve a video ROM ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy)))
+       if (ACPI_SUCCESS(acpi_get_handle(handle, "_ROM", &h_dummy)))
                video_caps |= ACPI_VIDEO_ROM_AVAILABLE;
 
        /* Is this device able to configure which video head to be POSTed ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy)) &&
-           ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy)) &&
-           ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy)))
+       if (ACPI_SUCCESS(acpi_get_handle(handle, "_VPO", &h_dummy)) &&
+           ACPI_SUCCESS(acpi_get_handle(handle, "_GPD", &h_dummy)) &&
+           ACPI_SUCCESS(acpi_get_handle(handle, "_SPD", &h_dummy)))
                video_caps |= ACPI_VIDEO_DEVICE_POSTING;
 
        /* Only check for backlight functionality if one of the above hit. */
        if (video_caps)
-               acpi_walk_namespace(ACPI_TYPE_DEVICE, device->handle,
+               acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
                                    ACPI_UINT32_MAX, acpi_backlight_cap_match, NULL,
                                    &video_caps, NULL);
 
@@ -127,7 +124,7 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
                if (!dev)
                        return AE_OK;
                pci_dev_put(dev);
-               *cap |= acpi_is_video_device(acpi_dev);
+               *cap |= acpi_is_video_device(handle);
        }
        return AE_OK;
 }
@@ -164,6 +161,14 @@ static struct dmi_system_id video_detect_dmi_table[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "UL30VT"),
                },
        },
+       {
+       .callback = video_detect_force_vendor,
+       .ident = "Asus UL30A",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"),
+               },
+       },
        { },
 };