Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp997633rwb; Mon, 26 Sep 2022 08:23:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KjnAf/2EDXpKOZJzgf1XqpBI7qVmmAfxJx9VBjQsIIk0P/xuCzoqluZBvvty+lJ6zTfk+ X-Received: by 2002:a17:906:478d:b0:783:2270:e85a with SMTP id cw13-20020a170906478d00b007832270e85amr8241730ejc.371.1664205779813; Mon, 26 Sep 2022 08:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664205779; cv=none; d=google.com; s=arc-20160816; b=Rv95O57Ev+rGnnoSQAmDDn61EyR4SH9JkuiaMOT0WAj0IEmH7ISxH45n/q3s67RCxf 1RXMKdRggxC/dpRynlKvUlvMXfDkEke4SFcKx+r3NQrjbjGpjgiGLB2BJdL+R3pLT6W3 HMCCQfhctqSU5rC4c2/AnexuVB+T/W8G+APwqaD+VAcYTNr5qXFgUZ9CmadfDa9hjPLI LumZf4fgLE7NdDUoTMLWYO6WxaQlsicDmY/6/1uDUZlzyYAKF5wFV+zZBUd3HPeS223H ZoLv1MPaOJEBj32DV2hAywZFCm/k39d1gTBKS2fmy4NYaL1JwmyoCddkCqt7sKv31Qt7 XACg== 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=PbfzL4hUuo+1NLtD6omjD+VAyN/+Le1v9ShJdcAcNLkzxR5FzAMoKeDGgjOJD2cXmT NHbymYJXd3jXabSsUzNXqbk4EXhy9hqx6F88kU1p3ujOLqOgKSFlliSUVhCR0ACn3L5g X54LQCFsPNDs7JjAfVVl5fVSJmO6IvL6Jlbf2JJjKdsD7/0888ahea172QPjYKOrNT/f +pmgbAAsShMuyvMBgRRE4xXkLKXwUY3o6R59fuEob94VPcVJbcbqXGCuV9yG6B6BkKZ+ XofZv8he7qnAvMiXtwx7AqaddntIferlFeuKxVFfn+WlypUg+SRn3YDTt8dnbhO+RJSx SMWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yXgAz7fH; 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 ka10-20020a170907990a00b00782e437a368si209732ejc.160.2022.09.26.08.22.21; Mon, 26 Sep 2022 08:22:59 -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=yXgAz7fH; 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 S236258AbiIZPUi (ORCPT + 99 others); Mon, 26 Sep 2022 11:20:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236352AbiIZPTF (ORCPT ); Mon, 26 Sep 2022 11:19:05 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B176582852 for ; Mon, 26 Sep 2022 07:06:31 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id t4so4579692wmj.5 for ; Mon, 26 Sep 2022 07:06:31 -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=yXgAz7fHswCIEtOIYeo9cgpLiiJBWfgvR4uHjBK+K3qUYbnA8Y++ovFczH2C2Z7gtU N9C2D/iFJgdiYBdSN8O/VHkxCnNTG45plxKso6KCjXls1Jyot4+M4i82ezxMXH6d7U24 TG2E+oksIjDAputjsIhcsdUgxOX8SKFQYt+8WdKoC13fpMeTX/VQDK/tFu/VJfWdG+ny snjNU2/Xgz7PLDUjyfNwSLF+WOOoiJXEJVo0Qyuky86Wm2qjhG1STdPTdjEUJPIAe/uB hHZqWe/jK0wKdeMATM2ltoobIgkwpjo5Uwra5cIi8i4cE1ARfJYc01OvLEFAW9NF2j5c R1FQ== 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=FIQFxfSXnJrxcnlmq1K01Jzrgvtmzbw8Z+9+I2JKbQ+p9cyL6X0IsGAwKdg7WXrDTT l82oZ/HqgBsGpU4rN2/+ONL/bJidNSamnegdw+nbI9DPwupSBvaMBAS15cNxZGsk9X4i VZr5SqdmswGFSTFyJLFbWKErq4wxgIIlMnfljGkjYwJUAKuDAJ9mFRyvotOxrt3mMrx9 Vmmd8FvE4ujP2Qzk/xL2cONeFrYlp/R1WPGCIsMLX9FHaefPAr+9cYybvMWztPJfGuRt JoZB3PLVJ7xblqRtn83DpNVwP1TI4RCK8pUgt2aBMF4znfC0E3bTWu/IyopEbmQaTb1m yo/w== X-Gm-Message-State: ACrzQf1e7P7dAVQVTv3tpL3Al978WTccuL9QcmTqY0mo9MAHTNAVUDEi 4Pg1jXo9+cJgcarSBx5q++M8SA== X-Received: by 2002:a7b:c050:0:b0:3b4:fae1:6bce with SMTP id u16-20020a7bc050000000b003b4fae16bcemr14732183wmc.131.1664201190192; Mon, 26 Sep 2022 07:06:30 -0700 (PDT) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id v3-20020adfebc3000000b0022adf321d22sm14310731wrn.92.2022.09.26.07.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 07:06:29 -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 v5 10/30] thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip() Date: Mon, 26 Sep 2022 16:05:44 +0200 Message-Id: <20220926140604.4173723-11-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220926140604.4173723-1-daniel.lezcano@linaro.org> References: <20220926140604.4173723-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=unavailable 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