From patchwork Mon Nov 20 12:08: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: 167100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp2150478vqn; Mon, 20 Nov 2023 04:09:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+jreO7wK3+TpmU21X3InFS85sV5L9OEYUNIhu1GIu2HF9tDnJ3XzMSc1rFDkTczFZUAwg X-Received: by 2002:a05:6a21:9997:b0:181:1cfa:4106 with SMTP id ve23-20020a056a21999700b001811cfa4106mr5880780pzb.62.1700482193104; Mon, 20 Nov 2023 04:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700482193; cv=none; d=google.com; s=arc-20160816; b=e1JF6LENgYvKX2b0bErmTJiORVSor8RO7dYBt8q2PIaLhc7+4Cis3a6Qfc9hJPU50E kwIrZ+wwWPsNMkkppWXmm9nGxqOkXoYVKLQNsrja2VQW97zy3TLz5ABFX7FgllRA6c7r hXB2C7w8WwdOWbNYNmorg2tFFTfC6/RFBUDA8zMiPt32QAEoFRbYwNFQA6dXg3ljOz8q Mjr4n0LBdPg09A9nZF7JCHFUaYpYwXyJRI7hjpt4cRfkZp+w+Utd+AqmxS/ryK747hCf 0yWtgvKBiAIpw31M9WZ6iHcPG+LWej8oevjD0cszLMtfo8ijyKxYokgiAKSNfbSjREy/ DdTQ== 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=POC0C8E1NZyUkoyjVnZpRVrN7L4Jzt9akO/0d4fWoY0=; fh=LrjGCQr9k+7CYyd6XEdJgJkCFIUW/cPwqK3zW8PbdHI=; b=KkS9vrsNbxqHhk0QVZ6DzoMnvYTPIN1FKXgF0DXsmXgfQYV1bfZhz+KsT0aAlPQ3o1 JMoAnHpqPkvjOYMR1T80VjP2qVEC0Bs7SX/0Akrkmb5fIWzcq3u7h48ZUEjIBPGo7rxB cgXx+Oaj7sdETVBCbpGoRvV8CH9jis6bO20Hylo9JUTzawkBp+S29asB7Lm5VgL87cHQ kG9DsGh6VKcIOAzTP6W4eNTIqqAWE9T3rOGKT064u44dxNsFRjrCpr0gKayw4rXibRfR Z8C+mYve6sZenVCflnUaWOiS4QEjD551GnWTBB0zo3rrLSD/x8iWR8COxVE4wycAPeEC 6zhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B8NaFkU8; 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 t10-20020a170902e84a00b001cf640d2017si1189731plg.346.2023.11.20.04.09.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 04:09:53 -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=B8NaFkU8; 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 C99EF80A2806; Mon, 20 Nov 2023 04:09:50 -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 S233577AbjKTMJY (ORCPT + 27 others); Mon, 20 Nov 2023 07:09:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233518AbjKTMJR (ORCPT ); Mon, 20 Nov 2023 07:09:17 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD8A5112; Mon, 20 Nov 2023 04:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700482153; x=1732018153; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=/nqR+KlYfg0C+OhOQjsmRZyDysf3qyPk8ALUmLhgcv0=; b=B8NaFkU8l2OABLQLuN6DTAw0w0Z9HXWu3+/zdnow3OVrwXqDaVajioAi 4wMZBjes0J6aTHODK+4BfB6dNEXVAMv1xw6HySJuct3zCsyWpqbj6kShJ 9E/NzsiCIEVOG9gVGkwyCUAhomosdNFiLDYUJjzso5Wm3hr55MtJVS/7d qIbnWjYB5QKEdnggj74WgmiyLdfh8MuDsXFYtOQknLjYRYfCzLA9nQirF PPQJoKbunLj/cli87a7Q6ICwzdvUzBlENBqiDYsVAEEuBEJebF5Scire0 m0vauqgBB7/DtZ2Rd2x64H+XdFo3gggcpaOkCaJCk/nwNxHmtZw5ZJI9F w==; X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="394455743" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="394455743" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 04:09:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="769878654" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="769878654" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmsmga007.fm.intel.com with ESMTP; 20 Nov 2023 04:09:04 -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 v1 4/6] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Date: Mon, 20 Nov 2023 17:38:35 +0530 Message-Id: <20231120120837.3002-5-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231120120837.3002-1-raag.jadav@intel.com> References: <20231120120837.3002-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]); Mon, 20 Nov 2023 04:09:50 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783084816359497773 X-GMAIL-MSGID: 1783084816359497773 Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav --- drivers/acpi/acpi_lpss.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 875de44961bf..8b80ef7da21f 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));