From patchwork Thu Jun 30 21:28:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12902255 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 5FA8BCCA47F for ; Thu, 30 Jun 2022 21:28:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237561AbiF3V2o (ORCPT ); Thu, 30 Jun 2022 17:28:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237513AbiF3V2b (ORCPT ); Thu, 30 Jun 2022 17:28:31 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3838151B0C; Thu, 30 Jun 2022 14:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656624510; x=1688160510; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B0VMjhosdrjMBEAvWD5hkIGzjJXjnMXp82dnbVLODJA=; b=SbZiErPuFGnPQQUrbN1CttA0qoQGJMdR2/INfbA3FSETmtJwKLQe5/ZI FYPXncaNdaRwtR+wydRLfOzk4RGao7hAPLzPY4kcKPoX6nFzAH9GWHDyD rnPytUXty9QEz+CD9uqJGQqa/3wIz3lJzn5GYiC/r0FldUsXwmkSHZdOs Lp92pHX01j3s3Ov1Fqvuia3GOlsj+KOlvvgJwZV7QGJUUA29NCQoqqfJE /MZOMth9zT7vOzhFSuiYe+r69Y2pQBiDj1IeaUnAjPX7iMYmLGpP5qcqT smNLAONWnksHoyKG+W/PRS1uXdlXtImsreHfe3b2tkAF0MRLC7ijvGkQQ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10394"; a="265506576" X-IronPort-AV: E=Sophos;i="5.92,235,1650956400"; d="scan'208";a="265506576" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.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="591454759" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 30 Jun 2022 14:28:25 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 339A61A0; 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 5/5] platform/x86: thinkpad_acpi: Convert to use acpi_match_video_device_handle() helper Date: Fri, 1 Jul 2022 00:28:19 +0300 Message-Id: <20220630212819.42958-5-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-pci@vger.kernel.org Replace open coded variant of acpi_match_video_device_handle() helper. Signed-off-by: Andy Shevchenko --- drivers/platform/x86/thinkpad_acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 22d4e8633e30..624cb9436522 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -748,9 +748,7 @@ static acpi_status __init tpacpi_acpi_handle_locate_callback(acpi_handle handle, u32 level, void *context, void **return_value) { if (!strcmp(context, "video")) { - struct acpi_device *dev = acpi_fetch_acpi_dev(handle); - - if (!dev || strcmp(ACPI_VIDEO_HID, acpi_device_hid(dev))) + if (!acpi_match_video_device_handle(handle)) return AE_OK; }