diff options
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 1bc0c74f2755..98f1d4e55981 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -807,40 +807,11 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) | |||
807 | static int acpi_video_bus_check(struct acpi_video_bus *video) | 807 | static int acpi_video_bus_check(struct acpi_video_bus *video) |
808 | { | 808 | { |
809 | acpi_status status = -ENOENT; | 809 | acpi_status status = -ENOENT; |
810 | long device_id; | 810 | |
811 | struct device *dev; | ||
812 | struct acpi_device *device; | ||
813 | 811 | ||
814 | if (!video) | 812 | if (!video) |
815 | return -EINVAL; | 813 | return -EINVAL; |
816 | 814 | ||
817 | device = video->device; | ||
818 | |||
819 | status = | ||
820 | acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id); | ||
821 | |||
822 | if (!ACPI_SUCCESS(status)) | ||
823 | return -ENODEV; | ||
824 | |||
825 | /* We need to attempt to determine whether the _ADR refers to a | ||
826 | PCI device or not. There's no terribly good way to do this, | ||
827 | so the best we can hope for is to assume that there'll never | ||
828 | be a video device in the host bridge */ | ||
829 | if (device_id >= 0x10000) { | ||
830 | /* It looks like a PCI device. Does it exist? */ | ||
831 | dev = acpi_get_physical_device(device->handle); | ||
832 | } else { | ||
833 | /* It doesn't look like a PCI device. Does its parent | ||
834 | exist? */ | ||
835 | acpi_handle phandle; | ||
836 | if (acpi_get_parent(device->handle, &phandle)) | ||
837 | return -ENODEV; | ||
838 | dev = acpi_get_physical_device(phandle); | ||
839 | } | ||
840 | if (!dev) | ||
841 | return -ENODEV; | ||
842 | put_device(dev); | ||
843 | |||
844 | /* Since there is no HID, CID and so on for VGA driver, we have | 815 | /* Since there is no HID, CID and so on for VGA driver, we have |
845 | * to check well known required nodes. | 816 | * to check well known required nodes. |
846 | */ | 817 | */ |