Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1188337rwb; Wed, 28 Sep 2022 14:40:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hKqpL/wvvwacdRvov2fbmegJH4/N565pyu1i8Bwja3MtWcyRXHT6qJvnwA2L45Gt4eRtV X-Received: by 2002:a17:903:18a:b0:178:3ad0:2689 with SMTP id z10-20020a170903018a00b001783ad02689mr54266plg.20.1664401221161; Wed, 28 Sep 2022 14:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664401221; cv=none; d=google.com; s=arc-20160816; b=ysghsUgV0+yxhwNynsL6zohuow88DzfvOxJL68lYwW0iCgtDkL4NGbO0nu9yaneNPu JT2YSCEwkK8bU2AozNgnE8F8hysWjrMnnDDDZpImApEW8qvg3ZuUEkVksphnpm9bGN2e VlTzW0ZKlplc5dZQZu7gmp5EvEsM2LAFzvD5WJjc23RjcNVKhU9yDbUySOP4l+ZH2ub3 S6thf56s1EuVjvZTn/suESKFKLWsHwNAgCpXFOxU1OBmKXTELYGntfkb7macAtKWm+dm J5FKQX2v6xF43eDIrjOHpxnweAEmOfxFEyk/Pv6vhjLz3ZD0ehxSGFAgyFtdzpO4GRFn xwpg== 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=bI9FcDUvyx5x2QkeT+gSSY0wbQSRCl3uA1+UuOnHTgVXVyd9LLJrcGnuGwson+YwWG /cauMSDdCVQQrRCKo+XMB1ZM7DIke2MWadnXQwHUF15oSleNFdsbzJuBXF9y1fEqPU06 FwQNzxnZXnmTBiAlW3ZRvAxcYnciQ2mXsfvv54DcrmfjGokxZzjP1DtJwSA19cVmE1T7 r00SNyVSn2ZrFCheMcpTrNaF06+OLptS4TX05LJPDB0zX5KDpWGYTFw3dAGPGUFvNh5w hfnGlJfEuqr8GW9VDLZ64M4QtenIrzWFfEB0BdSJeP5t7AhqkjdzIGHpnnrlu+1jolwt CIOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zIaovsre; 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 u14-20020a170903124e00b0017540816378si7108153plh.48.2022.09.28.14.40.09; Wed, 28 Sep 2022 14:40:21 -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=zIaovsre; 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 S234278AbiI1VDb (ORCPT + 99 others); Wed, 28 Sep 2022 17:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234254AbiI1VC1 (ORCPT ); Wed, 28 Sep 2022 17:02:27 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9759795689 for ; Wed, 28 Sep 2022 14:01:41 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id n40-20020a05600c3ba800b003b49aefc35fso1656561wms.5 for ; Wed, 28 Sep 2022 14:01:41 -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=zIaovsretz4ob0W6haibS64e3eYE9UUcghGi5J4rDOm8GHoKVRcw9YLq8FRl9hBn3n Eb01X1QgQSDpLrAstTrvolVJl9IDySp16Sh3pdpLtw3zCa7SFiJ6fkAKzqh4wK4256sg u98Qf2uNwGoOqg0BMehAjtIcGEA458QcKFI18W8NGO+TIUhlMmxv3RT00kLPVKOkw6Jm p8eLAC+4fgl2sQ/egNs2PQlozV36emVmBTB5UKTkYX+6NvE0/kdyZQakb6e6/c5Rw4Fy SqZN2RmhslHSulWJvOQkxBpmAiJLKnsyLhmE0axJpVVCvu47OHp6XL1M+EuiCe94CWk/ tk1Q== 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=bvwbnEK9nUGulp/Bkj+XFXZnytPeVaLD4jX0y+PZMtBhCbnzbn/l/bIXjGJ0af2Wi0 N1czJrXimzDk8B2eMQPcVdUbKkz5gVcDJDASP8SUfBykgSA5ekoLokk2y9pmh5kkMnhn F4fJya8jfTP8XMIJ/mKXsOlek5XkeKN4Yq99bMBkTNa2tPCKdpHbkRaVX+WL48TU338G 2ZG6Cc/SGLoiWBq5IIukva2HZaoZnDgXVqMpvhu4H/UYsOutnfYY45LrLKxYR6oPKyJG TpRPaqLAhRSEpe6pMY0F3a4UFVqDq/YEMStV0+hbK2O/T1aSDQkOjlH117fpJBCRL+fA xWBA== X-Gm-Message-State: ACrzQf1R+jKZo1Q6HtNPDbjvMavV4punOXqPIDDbPKaW+B5dDyAw3fHt oFarAIfnt9pptMmfmf+DSa0vWQ== X-Received: by 2002:a05:600c:1d28:b0:3b4:91f9:aeb8 with SMTP id l40-20020a05600c1d2800b003b491f9aeb8mr8321416wms.136.1664398899437; Wed, 28 Sep 2022 14:01:39 -0700 (PDT) Received: from mai.. ([2a05:6e02:1041:c10:48a2:39eb:9d1b:8b8d]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b003b4931eb435sm2874300wmq.26.2022.09.28.14.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 14:01:38 -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, Raju Rangoju , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Peter Kaestle , Hans de Goede , Mark Gross , Miquel Raynal , Amit Kucheria , Nicolas Saenz Julienne , Broadcom Kernel Team , Florian Fainelli , Ray Jui , Scott Branden , Support Opensource , Lukasz Luba , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Thara Gopinath , Andy Gross , Bjorn Andersson , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Alim Akhtar , Thierry Reding , Jonathan Hunter , Eduardo Valentin , Keerthy , Kunihiko Hayashi , Masami Hiramatsu , Antoine Tenart , Srinivas Pandruvada , Dmitry Osipenko , netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v7 09/29] thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip() Date: Wed, 28 Sep 2022 23:00:39 +0200 Message-Id: <20220928210059.891387-10-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220928210059.891387-1-daniel.lezcano@linaro.org> References: <20220928210059.891387-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