https://bugzilla.kernel.org/show_bug.cgi?id=75401
--- Comment #12 from Pali Roh?r <pali.rohar at gmail.com> ---
@Alex Deucher: Why is this bug while loop needed?
static bool radeon_atrm_get_bios(struct radeon_device *rdev)
{
...
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
dhandle = ACPI_HANDLE(&pdev->dev);
if (!dhandle)
continue;
status = acpi_get_handle(dhandle, "ATRM", &atrm_handle);
if (!ACPI_FAILURE(status)) {
found = true;
break;
}
}
...
Is not correct to use ACPI_HANDLE directly, something like this (without while
loop)?
static bool radeon_atrm_get_bios(struct radeon_device *rdev)
{
...
if (rdev->pdev)
dhandle = ACPI_HANDLE(&rdev->pdev->dev);
...
This could also eliminate using PCI_CLASS_DISPLAY_VGA.
If I understood correctly, ATRM method is specific for AMD cards so searching
for ATRM method in all avalilable pci devices (which match class) is not
necessary.
--
You are receiving this mail because:
You are watching the assignee of the bug.