From patchwork Tue Nov 21 10:38:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 167644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp528913vqb; Tue, 21 Nov 2023 02:39:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2A2YG61r737YvTtIYLT0OwDFq+Q/0gCPlSVSn44g4NDZxPwwcfxAyodOjGACZ5NfxHYgr X-Received: by 2002:a05:6830:1304:b0:6b9:6419:1cde with SMTP id p4-20020a056830130400b006b964191cdemr10685659otq.22.1700563168065; Tue, 21 Nov 2023 02:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700563168; cv=none; d=google.com; s=arc-20160816; b=KIs70FpSgh3EAr/GUiEN3kPaHA5oTgsMALlOEFC6x8osGqoMLetd+SnutSnoAffqgM u9EzaX+Nz7Duu5iuWwKbnj10FIPlw/Iv2qEcOKT5d5fUrBb9K4MHMqk6fHc0/k8y9i/u XXhbDfmgHGQh+5Hl3hEqoNK9oBstpoCZ6vzmtXdTkZWxzecS3IUheQvUEIZzXcukez5e ngri0nA4yFY6jRKOBHXTPsxr7RVB0bpDNm5ZLYI00YRX7qPgUY6anE/d2f4KzcjfMh91 5AAAr4BBvIJ7/Q+8IySTPKXMz3a5CE2WR6f/5+ZQmUcWRrWk94HqYOBh9DvsEhQSQFCQ OHMw== 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=VnUpMqS/2UvpyxcOcVsoBMkoDAGjzKxSt1aaIsuWfZQ=; fh=LrjGCQr9k+7CYyd6XEdJgJkCFIUW/cPwqK3zW8PbdHI=; b=IlfEQGW1jQdlSNY+idZCs4y9ZK7OqM99tHAS25myvELI5xBsrnjf8lrBK7MP86LvZB 2AOe8twqphpjl8upl4hp5unL6Bc4VcczndlOdnTfdZuO2urwCbR0ds5NBTg2hlJU/7UZ QJuipyOPEZJfyvNyILE9i+IJYYhO/fkB+Plop5stXvQoGnnk6r25hVFowA3sXkL24bEa gsrBDPNixRb9wemjgQldVdjdLnB1WiuaM8UmHv4FilWMLJEJfsnHOWaFyLXUbYSzLG95 GIjcalKMIav2Zkc66I3PWNgNxs9DMLXdEa5zS4IkYLz1kJ3bZpYDEK8DW/KM+aGgHdjK vyHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=l8vTUy2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id h3-20020a63c003000000b005bd5a60d73csi10354707pgg.708.2023.11.21.02.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 02:39:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=l8vTUy2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 0944A8044394; Tue, 21 Nov 2023 02:39:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233919AbjKUKjH (ORCPT + 99 others); Tue, 21 Nov 2023 05:39:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233883AbjKUKjC (ORCPT ); Tue, 21 Nov 2023 05:39:02 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6ED1198; Tue, 21 Nov 2023 02:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700563135; x=1732099135; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=T+lHnAP5LZ0cCsv+uOEYyeyFPKszoxdDpc1va0QseKE=; b=l8vTUy2c1emPaJn9m03rbT2+3w3RUWlOt8C9EVHiTRB5gOFZhrsozf9U oN6SvfSjSyqe+jJAl0FDkbEjAM6JnHBxcjbXOsD7Q384Y+w4Xp2BtUpgZ M16Jl4hqkFqvrbH6ETOqxayKTWXOvXhHXcWX1bLTTyCj+NLnp9vk7GxMb XuryEcsXlg6qUep2elHh6++5YAvM8Y1ZPfuH+fk5cPH9g2GK7HQT6aQES oJmJxYsMvd1pE4xuzCTkKa5s/ZtYI2JFI8bYLxrJqLhSCsRKE1iPArqsd NRdTHJwAKn7N483cYyrc+VCf1sUkSugVvHS7y9EJ3GF+oVrM1dieER0Ik A==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="371986937" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="371986937" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 02:38:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="14871948" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmviesa001.fm.intel.com with ESMTP; 21 Nov 2023 02:38:51 -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 v2 4/6] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Date: Tue, 21 Nov 2023 16:08:27 +0530 Message-Id: <20231121103829.10027-5-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231121103829.10027-1-raag.jadav@intel.com> References: <20231121103829.10027-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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 02:39:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783169724654678368 X-GMAIL-MSGID: 1783169724654678368 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[] = {