From patchwork Thu Oct 26 08:33:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 158446 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp515764vqb; Thu, 26 Oct 2023 01:34:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGO8z0qRvvYrE+2rgSX4XJ+DV21pI3B2SG//nJp+r5XYKuA7Eg9sQqQLofMjiLk6pYTyvBg X-Received: by 2002:a25:258e:0:b0:d9b:b77e:23a0 with SMTP id l136-20020a25258e000000b00d9bb77e23a0mr3361516ybl.11.1698309241459; Thu, 26 Oct 2023 01:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698309241; cv=none; d=google.com; s=arc-20160816; b=SJJ1LOIxjBtQrKdtVV/WX9itwAUQty8DIKTdOU96J4tpLkQV0+ZO0emld5nPzagBjH Wfgmi4N039GYacdwoUin5wB8dNmqIhJJtK7+km4RcmQIWlzQ+3yWjpoE1BPbDH/ay0QJ 4B6UUPw/ZsowzfuKydL8OVp3EYe8SIy945dANJIrry+pEjIwULCqBAJiGp7XOKlQLlA8 I/9qi13A8hkBXZ5++FX7KrYfA/7t6/TFZirtZsC1y1Jn9airyowRAunRVxkds1viQ6C+ mDNnHbrUVL3qgkhacwaIACvAaVKAYwMYYt0uYpTLFBK1b0W6W4pPffBlLm6lIFqinYT0 7AXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=Ta60OdDxNBcgMz2I51p+8N9rWvGwnmX65IwKcs6F01E=; fh=2xctz/0e/SucHBlfO1OvWtxLt2i80Mg3jU6mKooxmDA=; b=ICfnHi1X0G6SCPyqCCC9hVngkUb5gIcH6zitHxUPpMxKnxdYzaVV2tlabkrRFxMRDP VXpW8fME8PoN8+UKCTULm3dBdkwrbSKDmWlBB3CjKx+lM7pmAn5z8C5UPGROywldaO2S PmwwEWhFK6mbdBBG4kkBVMXr8q1H6ycHmYlSt3HvcAAk0cuVl7pJMFCjtRUJiQHpBkGz ZvtXVpPuEiYG1nT3bnz6IoJQHFbHZ1mQa3Dnv2HgTgZ6xB17EbgZLv5hgoGh9HLSLvwg Ol4dsPcbrj2fO0wtoMiHck4P/GWukgGT6TBzalCUKPuK5DkfMiH9we7eqYgrZTWr/CRe IS2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QbTQGQUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v191-20020a25c5c8000000b00da053ac372csi5899899ybe.369.2023.10.26.01.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 01:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QbTQGQUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 54E98820DA3C; Thu, 26 Oct 2023 01:34:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjJZId5 (ORCPT + 26 others); Thu, 26 Oct 2023 04:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344604AbjJZIdz (ORCPT ); Thu, 26 Oct 2023 04:33:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BC55128; Thu, 26 Oct 2023 01:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698309233; x=1729845233; h=from:to:cc:subject:date:message-id; bh=8ikynLCsVFIJGquU/FrUnN4LC+5ZCI0bxGFqtHkRQ2Y=; b=QbTQGQUznNRp1vTBVjttVygMayiStSqWBuOvpYdXR+UH7y9moYZ9M+UG qiSTSx8hcwQD1ez6wHK0vyKgsZqBJgbVjLvShUhbIpALzZnWpZQcduGbS 0qtNeLPcTqMO8oRHGO4XDn2eYWZb4LyiMl9kkUBqw4Jfg8RKSpeikRtJ8 3X+i6YmiP16Xy+d+JofLP8L6eBzGUTXm+hwGX8GJNCn+jx8x8P0NUO1Jm d998CY4j93NpWfcbNcABCA+lZsVnLO9pF9/cELKlkCAHfElWk4j2X5qZD K0aY1eYOM9o2GEAByvxnPcO/m1vHU0AROkxyS24pbJDgHyGK1YdRZQOmY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="9046786" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="9046786" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 01:33:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="1090526373" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="1090526373" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmsmga005.fm.intel.com with ESMTP; 26 Oct 2023 01:33:50 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v2] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Date: Thu, 26 Oct 2023 14:03:35 +0530 Message-Id: <20231026083335.12551-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 01:34:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780704720722812531 X-GMAIL-MSGID: 1780806311393774418 Now that we have a standard ACPI helper, we can use acpi_dev_uid_match() for matching _UID as per the original logic before commit 2a036e489eb1 ("ACPI: LPSS: Refactor _UID handling to use acpi_dev_uid_to_integer()"), instead of treating it as an integer. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- Changes since v1: - Update commit message drivers/acpi/acpi_lpss.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) base-commit: f9c7f9d537da013471e5c7913a33b6489bdeb3cf diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 875de44961bf..6aaa6b066510 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -167,10 +167,8 @@ 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) + if (!acpi_dev_uid_match(pdata->adev, "1")) return; pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup)); @@ -218,10 +216,8 @@ 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) + if (!acpi_dev_uid_match(pdata->adev, "1")) return; pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));