From patchwork Thu Jun 30 21:28:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 586197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D919CCA473 for ; Thu, 30 Jun 2022 21:28:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237552AbiF3V2j (ORCPT ); Thu, 30 Jun 2022 17:28:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237557AbiF3V23 (ORCPT ); Thu, 30 Jun 2022 17:28:29 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D702F443D3; Thu, 30 Jun 2022 14:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656624508; x=1688160508; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jdYxOV2rC4m5qbz+X1x7eTSjCsv8/obXsOi7V/f8hhY=; b=h/xtQaWNAVZawetWJKstFUzls7srfPBlKHmkrK3MMk4CPaAPecnOZI06 zJ+qzCDHxFff+B9nABx7QoH8YYrq9QPnYG01qeLbG2hRdbx8uK4dZACJo CeYx8E0FPyRQlrcJCemYvxGowDG/fxxfJbMVdXk1Yrk9xYnbdohp9E4Uh +UHAZKzLrI4cMLUfon9xdCXX8aKvS+SONnEPDt2uauchGQoPv2JWSYMkv 60OG1leYy88FaxRWY1ors4IQ3KgXUNYKmcIXDx5s4K4gEh7YRP8r2QWm/ V0JVgozbmC0jpk7rKVwfpJy05RJh9zfeSxJTTnYnSL3oqtVVolWXSZhJU w==; X-IronPort-AV: E=McAfee;i="6400,9594,10394"; a="282506504" X-IronPort-AV: E=Sophos;i="5.92,235,1650956400"; d="scan'208";a="282506504" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 14:28:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,235,1650956400"; d="scan'208";a="648065571" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 30 Jun 2022 14:28:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2E4871E8; Fri, 1 Jul 2022 00:28:31 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , "Rafael J. Wysocki" , Hans de Goede , Wolfram Sang , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" , Len Brown , Mika Westerberg , Bjorn Helgaas , Henrique de Moraes Holschuh , Mark Gross Subject: [PATCH v1 4/5] PCI/VGA: Convert to use acpi_match_video_device_handle() helper Date: Fri, 1 Jul 2022 00:28:18 +0300 Message-Id: <20220630212819.42958-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220630212819.42958-1-andriy.shevchenko@linux.intel.com> References: <20220630212819.42958-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Replace open coded variant of acpi_match_video_device_handle() helper. Signed-off-by: Andy Shevchenko --- 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 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