From patchwork Wed Oct 25 05:38:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2384344vqx; Tue, 24 Oct 2023 22:39:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJ4fZXYjFAPM9PifxpLt/lTN9wvsYcUWJdcmETkpdUJ6IFqcACCcs9i+OAbqA2ee9tWPH6 X-Received: by 2002:a0d:ebc4:0:b0:5a7:be8c:e85 with SMTP id u187-20020a0debc4000000b005a7be8c0e85mr15554786ywe.24.1698212357635; Tue, 24 Oct 2023 22:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698212357; cv=none; d=google.com; s=arc-20160816; b=A8t1a/PmaS+JLJXApSHGY11TzcqC/oCX5Oqsf1yepl4zxKNEie0DBIIvrT2lhElHAY zkIA+P5Hjo4T3FAo3B/VqbfscsuTj44spZaWvf0idzMa+ENBQjSGord8j8WblrOSTO0k qwVBjO012nqrM3qy48fTAJl7bUqvYq7cC9kIhHn/kTfyZz/wiaUMFzNDkR7eDR8m8uA9 uqv+XL/NzSOqq+RrF3qon/Ccbii48Z8mQdu/QCD+RqpiIBZboun1jLMWnBqc2/qfS40X yIMe4jJjO2miegFhCQ9TmYtD+AQpEM6VB9VpT4m/UGrh5Q56Ee39/pi/WWyfcWG509aG hSXA== 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=ITrKN4d+7d5/1lqm/vHOxrWTGY9R5qp0jslzzkMD3j0=; fh=2xctz/0e/SucHBlfO1OvWtxLt2i80Mg3jU6mKooxmDA=; b=lHrVL5vGxP7zYdFYv7fui/armhWde3SwtUKXeTVj1qvnstqqWHX43VIoN9fdY7dGsL 5nTEMdx3nBgWEA8ncx5V5PXqCPiqHgwzaw+9VfSFz+N2fcAjf3eUTonuWB0EwO4Bh37e //2xuxiiZCqEDdKHiIuNtCWYWjJnRbPP7yzpGuZodWwP9DuCDgitPMi8OPpe7nNEun13 a5ycwTnHKn9YEjRLDuSrqS0xyMGGhOZGsk7QltpOSZn9U0001iEqQD5N8psDGMiBd0yD 0IOgysTjt5dKmBTJc4tlt88nqLpUBRkXn38eBP8EJR6fuuvCoQQcTosyk99u1gKsfxUi MqcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GE0fIbM2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id x128-20020a814a86000000b005a1cf5ae57csi9313919ywa.472.2023.10.24.22.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 22:39:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GE0fIbM2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 46DE28029B50; Tue, 24 Oct 2023 22:39:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjJYFiv (ORCPT + 26 others); Wed, 25 Oct 2023 01:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjJYFit (ORCPT ); Wed, 25 Oct 2023 01:38:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C479C12A; Tue, 24 Oct 2023 22:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698212327; x=1729748327; h=from:to:cc:subject:date:message-id; bh=zkjMnmvGuvGDKzRPgyPhClkD5mU4/NkRV/n4i7OeNek=; b=GE0fIbM2r8xuUKnAElME65i5gfGxjeA1Dpb+leLT8nPZXZVHUz43La+w 5Gwp/YkG9KqzIEXOUaUQFEaeh7iLAUQIdRSxUtP1AFZbEhXgUdNAlFjRs i/LBCxZ3ufpjCGw1Ny5DAUa9fk3ATtEf36hk/X9AHjSbyIkXsuagKgPi/ TqBHfJzzEDgikYL585qHPHNF+qjpUaTRzIC3aE5+oMRO+PX/CT3T1VNHu rgp43i7gL+CbL+3O1xybJm+XABDGDl5ERq39CdFpzrL5r+i2cNQwwVeBh +NXhDX4cSvj9VSI89ibRkGnYn3R/l0zgnNQ9BpoLzvmhkfp/9HdT+dVT0 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="390096231" X-IronPort-AV: E=Sophos;i="6.03,249,1694761200"; d="scan'208";a="390096231" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 22:38:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="793753056" X-IronPort-AV: E=Sophos;i="6.03,249,1694761200"; d="scan'208";a="793753056" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga001.jf.intel.com with ESMTP; 24 Oct 2023 22:38:44 -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 v1] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Date: Wed, 25 Oct 2023 11:08:33 +0530 Message-Id: <20231025053833.16014-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 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 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]); Tue, 24 Oct 2023 22:39:15 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780704720722812531 X-GMAIL-MSGID: 1780704720722812531 Use acpi_dev_uid_match() for matching _UID instead of treating it as an integer. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/acpi/acpi_lpss.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) base-commit: 72d54941cd56ac3fedca6f7ae00a300b33ead29e 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));