From patchwork Thu Nov 23 10:06:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 168847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp338385vqx; Thu, 23 Nov 2023 02:08:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+7ipr+uI9L5IQGytobKouVNBSPKjsfHwsK9BerBmjy987KTLkJeODmS11fynpyKRfaWSi X-Received: by 2002:a05:6e02:d03:b0:35b:24ef:ddb6 with SMTP id g3-20020a056e020d0300b0035b24efddb6mr5257967ilj.19.1700734105957; Thu, 23 Nov 2023 02:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700734105; cv=none; d=google.com; s=arc-20160816; b=Z+grYNMNQKTLpDj24sNl1Y1t62bsTtmT9OS6oxELe5lsrtdsoSRkIp5rko7Ycxllsl 6DJehIBTu9fJAvlREUS4PKvy0vOUvdDuZWCns2JlU+iuvJRgotAlRIl7oMgs8tm9PJcR reoErrsbEYhyiTABf6TwqIHLOKU16fq23hkSyRar/v50UoVTRx6ymlwsQ1IpEqJxD2OR zMMcrMc7q95mtmvEtrosCDjcnIztwtzNfCjIBL0p9ueL0mxGzr2SDHcW582mm+VNEJiF UjjdnazQDfVcp6x//hFlKEpXHdWl1Pu/+wqsWCDfC91DpxUWX0fw1iZgUBzRlmD2fjVs b+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=vKn2+4j3l1cxWUSYl/dGHbyi8WL+9X4sZnCFaAS32PI=; fh=LrjGCQr9k+7CYyd6XEdJgJkCFIUW/cPwqK3zW8PbdHI=; b=Tkb/jxHs2JAgnk/lrEZFO3x++Sa+aQz1HjxIY9EtXhkjVm4PC/MuyriMCK4WQwf6mF klU5wBDNykQsOELLF7Le0ZWsoFkq9fMgKbQTzIlKVxl6YUswqIp5vqE4STuB7MvI8XxG IRMgJAOOtL/SmIut5h4dMQFcnBpS7bncnkYhqos+HdwguKgnP98OHyXi3q9cIuqN8XQA yi00MlDXERsTon1Aio+IgiHjHMimNRKdk9e6PCG0aMZ9PZNbnf1/REjk1sORlOzlgDXQ tRSSqZceAtKqOKXykcev88T1JPUVdGAEUM1ng43/FS7mO8aOccB6ycjL9Z67NgXSq5IB RgMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Kq0gVa/R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id k2-20020a635a42000000b005be1ee5beb7si963505pgm.534.2023.11.23.02.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 02:08:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Kq0gVa/R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6F4AA80834B5; Thu, 23 Nov 2023 02:08:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235319AbjKWKHr (ORCPT + 99 others); Thu, 23 Nov 2023 05:07:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235259AbjKWKHV (ORCPT ); Thu, 23 Nov 2023 05:07:21 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C181510DF; Thu, 23 Nov 2023 02:07:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700734047; x=1732270047; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=UiSJDgehd3ZmZrMiVJSfKgyDPoJmiX2ZPNSPqcXf4ys=; b=Kq0gVa/Rbbqvwi9qHmf/ChbmHC0mx/iVDs8WcAdrWOJEA6tPpYCAQ6Xn zwDOH11XAY0h4CcxTsLdjNJQYNgu78j+cLGshjp5f0BIgfJrLphmlzn7V VCsQIKH2jR8NzTFq+K0b2ibIuiYWKwaSKPFCPwxR+uTC+Irr5rul0DAo/ dIoksejh0QIKcCiXpu7ofvISthm15FBosLlJGHlj62hZlKJ/U5dHaHIfZ satVtOsvq5ipRh2xq3U+8G9qpc6nxnukCJytrfDlKzfV0kXRnx5SGmtyv 847sdFklD1NGXV1OXOHlrq3a4mbBf/VEaSME6/B5ylKyF3/m3AIZGD1az Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="456576415" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="456576415" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 02:07:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="767160492" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="767160492" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga002.jf.intel.com with ESMTP; 23 Nov 2023 02:07:16 -0800 From: Raag Jadav To: mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com, ardb@kernel.org, will@kernel.org, mark.rutland@arm.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 3/5] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Date: Thu, 23 Nov 2023 15:36:15 +0530 Message-Id: <20231123100617.28020-4-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123100617.28020-1-raag.jadav@intel.com> References: <20231123100617.28020-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 23 Nov 2023 02:08:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783348965667941666 X-GMAIL-MSGID: 1783348965667941666 Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/acpi/acpi_lpss.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 875de44961bf..79f4fc7d6871 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -167,13 +167,9 @@ static struct pwm_lookup byt_pwm_lookup[] = { static void byt_pwm_setup(struct lpss_private_data *pdata) { - u64 uid; - /* Only call pwm_add_table for the first PWM controller */ - if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1) - return; - - pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup)); + if (acpi_dev_uid_match(pdata->adev, 1)) + pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup)); } #define LPSS_I2C_ENABLE 0x6c @@ -218,13 +214,9 @@ static struct pwm_lookup bsw_pwm_lookup[] = { static void bsw_pwm_setup(struct lpss_private_data *pdata) { - u64 uid; - /* Only call pwm_add_table for the first PWM controller */ - if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1) - return; - - pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup)); + if (acpi_dev_uid_match(pdata->adev, 1)) + pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup)); } static const struct property_entry lpt_spi_properties[] = {