[PATCH 3/7] Subject: Move detection time of video devices after ACPI PCI device setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: Move detection time of video devices after ACPI PCI device setup

video_bus_match detects the capabilities of a video device.
This must only be done for devices that are physically plugged in and
are not ACPI dummy devices. Therefore you need acpi_get_physical_device
to check whether behind the ACPI device a real struct *device is present.
The relationship/glueing between struct *device and struct *acpi_device
must have been done for that -> move video device testing after it.

Signed-off-by: Thomas Renninger <trenn@xxxxxxx>

---
 drivers/acpi/scan.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-acpi-2.6_video_native_vs_vendor/drivers/acpi/scan.c
===================================================================
--- linux-acpi-2.6_video_native_vs_vendor.orig/drivers/acpi/scan.c
+++ linux-acpi-2.6_video_native_vs_vendor/drivers/acpi/scan.c
@@ -1035,8 +1035,6 @@ static void acpi_device_set_id(struct ac
 		   will get autoloaded and the device might still match
 		   against another driver.
 		*/
-		if (ACPI_SUCCESS(acpi_video_bus_match(device)))
-			cid_add(device, ACPI_VIDEO_HID, NULL);
 		else if (ACPI_SUCCESS(acpi_bay_match(device)))
 			cid_add(device, ACPI_BAY_HID, NULL);
 		else if (ACPI_SUCCESS(acpi_dock_match(device)))
@@ -1275,6 +1273,13 @@ acpi_add_single_object(struct acpi_devic
 			device->parent->ops.bind(device);
 	}
 
+	/* Checking for a video device and add its CID must be done
+	 * after pci bind because we also want to detect its capabilities.
+	 * And we only want to detect the capabilities of plugged in devices
+	 */
+	if (ACPI_SUCCESS(acpi_video_bus_match(device)))
+		cid_add(device, ACPI_VIDEO_HID, NULL);
+
       end:
 	if (!result)
 		*child = device;


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux