Skip to content

Commit 3cecafc

Browse files
Zhengzengkaialexdeucher
authored andcommitted
drm/radeon: Use pci_dev_id() to simplify the code
PCI core API pci_dev_id() can be used to get the BDF number for a pci device. We don't need to compose it mannually. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e8b2ad8 commit 3cecafc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/radeon/radeon_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ int radeon_acpi_pcie_performance_request(struct radeon_device *rdev,
618618

619619
atcs_input.size = sizeof(struct atcs_pref_req_input);
620620
/* client id (bit 2-0: func num, 7-3: dev num, 15-8: bus num) */
621-
atcs_input.client_id = rdev->pdev->devfn | (rdev->pdev->bus->number << 8);
621+
atcs_input.client_id = pci_dev_id(rdev->pdev);
622622
atcs_input.valid_flags_mask = ATCS_VALID_FLAGS_MASK;
623623
atcs_input.flags = ATCS_WAIT_FOR_COMPLETION;
624624
if (advertise)

0 commit comments

Comments
 (0)