diff mbox series

[v1,4/5] PCI/VGA: Convert to use acpi_match_video_device_handle() helper

Message ID 20220630212819.42958-4-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/5] ACPI: utils: Introduce acpi_match_video_device_handle() helper | expand

Commit Message

Andy Shevchenko June 30, 2022, 9:28 p.m. UTC
Replace open coded variant of acpi_match_video_device_handle() helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pci/vgaarb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
index f80b6ec88dc3..47058f70c2c9 100644
--- a/drivers/pci/vgaarb.c
+++ b/drivers/pci/vgaarb.c
@@ -585,9 +585,7 @@  static bool vga_is_firmware_default(struct pci_dev *pdev)
 static bool vga_arb_integrated_gpu(struct device *dev)
 {
 #if defined(CONFIG_ACPI)
-	struct acpi_device *adev = ACPI_COMPANION(dev);
-
-	return adev && !strcmp(acpi_device_hid(adev), ACPI_VIDEO_HID);
+	return acpi_match_video_device_handle(ACPI_HANDLE(dev));
 #else
 	return false;
 #endif