Re: [PATCH v2 5/6] PCI/VGA: Convert to use acpi_dev_is_video_device() helper

From: Ilpo Järvinen

Date: Mon Jul 20 2026 - 05:09:20 EST


On Tue, 14 Jul 2026, Andy Shevchenko wrote:

> Replace open coded variant of acpi_dev_is_video_device() helper.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> drivers/pci/vgaarb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
> index c360eee11dd9..3de05aee7859 100644
> --- a/drivers/pci/vgaarb.c
> +++ b/drivers/pci/vgaarb.c
> @@ -575,9 +575,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_dev_is_video_device(ACPI_COMPANION(dev));
> #else
> return false;
> #endif

How about adding a stub for acpi_dev_is_video_device() if !CONFIG_ACPI
so this code can do without ifdeffery?

--
i.