Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5113582rwb; Wed, 21 Sep 2022 03:25:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vDtpiB74uHPrWl37jwXkE6ERdeB6N8XB/SFAPlJNRfStYraA72HsOm3UxFHiqXe4Vt+ES X-Received: by 2002:a05:6402:298e:b0:451:129e:1b35 with SMTP id eq14-20020a056402298e00b00451129e1b35mr24056321edb.79.1663755949559; Wed, 21 Sep 2022 03:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663755949; cv=none; d=google.com; s=arc-20160816; b=vXte2J2BVryNLD+Oh9cYl6mEbZ3Eq6SsycQvz4WSDXBNGNbH35a/Ipgp9Kk9t2OEOu L0sp0zObDJaErmW12RIT4Z2WO9eeax+Izp+OyWnsRd6lO4ThAnseyhccJVBnCrHaKmLx AlFjE6kj8so3heb052Q3kZfwLeSLi2njRSi8hXeapXZYeGspIgRdfcOudiMhYZntXtyO jEqwtlbrdh0Hioh/fLIh3zKNnMLZqUYgos7sKjhBs4AEGy2dZRV+ronrkF+MPryEdlri fLO3XKmuzz7f8qrxl/LV7MI4PxgoLa+q0FfzpxOgLHaWYp6vdln5HV4UO5JMMCfHPBV+ fr+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=pg6rtim1TTy2/XqGue1GXOxjUXKT3UoO4C4pLGhJJqr0xOG0z1iY0/mZwNOkzGKWH6 Zbli8rAItMNovIU8AHfO7ipz7qynVcJ4CXGUlmNEM/vZUuH0m9VGaY5eSQW6BE885ob8 jS4bgHwUdvKcFjtYsLoHoTR6QXKNVxKL0q4H+V9C7OaYrQF7fEKZHSveyBZi9nCzkMCp jt35+yurJGroST7pGUkQCyjI0vqPiPFMSNFfM8DIa/rciLDJcRwJ9feJvfAvAwwUy0ZP xfrtZLDffJ5lg7aK8F6rhQHIAblshLmdT4mmWjbN4fGbddKxe2+jsoeEpRlXM1yP4hNI 2ZQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="STS/hkaX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a509992000000b00445dfc9c0cdsi1915442edb.122.2022.09.21.03.25.23; Wed, 21 Sep 2022 03:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="STS/hkaX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231342AbiIUJor (ORCPT + 99 others); Wed, 21 Sep 2022 05:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231771AbiIUJno (ORCPT ); Wed, 21 Sep 2022 05:43:44 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24D0D9320E for ; Wed, 21 Sep 2022 02:43:36 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so525527wmb.0 for ; Wed, 21 Sep 2022 02:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=STS/hkaX5fTFQngJMGA3ECsx0YNz/DGYRFInjs+Pvwg4Ke/RBoKCJf2tDQlQj66ZPt LtFaOLblPP5sDEAwlxxwRcjgYSotQwt6s1+hIFkB9F3CymD0S9DPgqt9DMSgAAIYIUIc /ihaJ90YfFmBZLy1nvUECuoY+VfNvQXGC/MpcGMPiXMkzg/K5vg1uRgWeq2E4LtEUEKL R9xWj7G+0RpgE1NvR4OHOriTA3Mu7dkZQeJDvfeelamAkf/VCVjgoiIqCokMdwRFCv3w qEN37vFopu5zsv+OKKa1nNuZryLAqkyI32+rHwU6nyO7r3i9/g8LD7ssEfqaetxvi7Se KkDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=mch7mqtr6WvnLkcO9R1AfxTQsHiYDXsqhBOQ8mS9dImgCt9zazO4EjoVNGxC0Jpu9r jGEG0PUP/I8oFFw9hTfcsXW1YsU0mSGsLOBfa5wZJKnTrVyP0F9KdDM09+JB5wJGt420 o5vyo4rBGDdpsUIlaDwcSLb+c3qDs1zwH5xEQupVJqzQd2IGx4usRIBFMN77ck5qyTYS Ojb5AjBVogSzOxPhr29dc2NvFVl+8VJWISVHGsSx1WMAQei/BPz8PjtGf4oJpW772t57 UOj5hV8oL2zvuwE1DsdaLWJ+VhdBoqJBvAKTBQCFYfLvd7xqtlEVHYNmbZdF6taJjyL6 tvZw== X-Gm-Message-State: ACrzQf3lSuoYQwrz1OyyRQSFpgevcG2Qp+z+xsU2cHR41Mtf8HBu9W5A xndidST5zYzXXAmb3l/fa4mESA== X-Received: by 2002:a05:600c:2050:b0:3b4:a51a:a1f5 with SMTP id p16-20020a05600c205000b003b4a51aa1f5mr5044066wmg.177.1663753414618; Wed, 21 Sep 2022 02:43:34 -0700 (PDT) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id r123-20020a1c2b81000000b003a62052053csm2763917wmr.18.2022.09.21.02.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 02:43:34 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Amit Kucheria , Alim Akhtar , linux-samsung-soc@vger.kernel.org (open list:SAMSUNG THERMAL DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES) Subject: [PATCH v4 10/30] thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip() Date: Wed, 21 Sep 2022 11:42:23 +0200 Message-Id: <20220921094244.606948-11-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220921094244.606948-1-daniel.lezcano@linaro.org> References: <20220921094244.606948-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 The thermal_zone_get_trip() does the same check as of_thermal_is_trip_valid(). Replace the call to of_thermal_is_trip_valid() by thermal_zone_get_trip(). Signed-off-by: Daniel Lezcano --- drivers/thermal/samsung/exynos_tmu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 91e6860b5ec4..34b460092308 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -554,13 +554,14 @@ static void exynos4210_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= @@ -584,13 +585,14 @@ static void exynos5433_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, pd_det_en, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= @@ -615,13 +617,14 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= -- 2.34.1