From patchwork Sat May 7 12:54:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 570688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E670BC433EF for ; Sat, 7 May 2022 12:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384959AbiEGM7F (ORCPT ); Sat, 7 May 2022 08:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385002AbiEGM67 (ORCPT ); Sat, 7 May 2022 08:58:59 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA4B40A0B for ; Sat, 7 May 2022 05:55:11 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id w4so13399358wrg.12 for ; Sat, 07 May 2022 05:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linexp-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+Fhtgna0SXO11lyolbeD9TX1zF+jZgBIlJXC+kQtz6g=; b=xFD1YA0tsUnRveXB4wz1pSDBi/PdW63gXr5X9JyCHnEsDuMWXP7y8Jdywy4ZIkwovv p4KVovg7yYqo1lXnemwixXeeOsiwf0P5xoJY0Fg5kA1cwyl8b9kM/nEGeJFxWw8s2o2y UFAMNd34ZoyKGlKud0pRyFgfBPSNg3QaCTpJVNi4ZsVSNBEIPkp0ZYMBtMuR10HFS+C7 KY5A31zCGk2yID4TXbKdm31CvOaMyw6cOiVqcyaPQr53Tt3x7WEqUtpXTSfVBavmin84 3T7oBt6TwftmYmQn5SG8rPwxYGQGw0LSiTiW2ZJCEWMuMP1mwFXla51Bhidxzlnf91SQ MjPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+Fhtgna0SXO11lyolbeD9TX1zF+jZgBIlJXC+kQtz6g=; b=Rx/78oG3uBn3NO64q0fpEK/1TVeKlgXmN0lhsjDZ7keVeLiJm01mewPfAyrXjA60fd hAOlTNmH7/x2ViYNt18b4a7HFOOJC46mrJ6LWQ6E7cKft0ip7csuOwJm9aOBaDc0OfBy aNza0Vbu7hZvKVnS0FX6Orr7bpt85flt5knkrW54nVk5OuwLj8Ag6pWtkfxsn/azwPKW q7t1GVqFmRzaswdA78x4Gz4xx9NkzlosdXxdngCtXV57mjvChRnqtjeSBhy8eoPYV94S r3qHwYfP+v5GL/6nC5cXO+JOz2VqqiqDv+4NT1mfgAvACG/Y/9tAn+myLlMoGdgRTUHC Hzlw== X-Gm-Message-State: AOAM533wZDMCWL7mtSro7KBLY1S9So89AMOyXYkFKQA8eRl9NlCpVbJd jKB2qTUTIvbiUOmcv6YVFxeEMA== X-Google-Smtp-Source: ABdhPJzMymEKH74HWUo8C5GwkSp/38Pr1M06JMzc1zU8uSmNahO2ELY+L4cL85PCoMeNlK+d/rGH4g== X-Received: by 2002:adf:eb87:0:b0:20c:a5b5:6731 with SMTP id t7-20020adfeb87000000b0020ca5b56731mr6745222wrn.199.1651928111223; Sat, 07 May 2022 05:55:11 -0700 (PDT) Received: from localhost.localdomain (static-176-182-171-101.ncc.abo.bbox.fr. [176.182.171.101]) by smtp.gmail.com with ESMTPSA id e9-20020a05600c218900b0039453fe55a7sm10470345wme.35.2022.05.07.05.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 May 2022 05:55:11 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: khilman@baylibre.com, abailon@baylibre.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria , Zhang Rui Subject: [PATCH v2 05/14] thermal/of: Remove the device node pointer for thermal_trip Date: Sat, 7 May 2022 14:54:33 +0200 Message-Id: <20220507125443.2766939-6-daniel.lezcano@linexp.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220507125443.2766939-1-daniel.lezcano@linexp.org> References: <20220507125443.2766939-1-daniel.lezcano@linexp.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The device node pointer is no longer needed in the thermal trip structure, remove it. Cc: Alexandre Bailon Cc: Kevin Hilman Cc; Eduardo Valentin Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 2 -- drivers/thermal/thermal_of.c | 8 -------- 2 files changed, 10 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 726e327b4205..ff10cdda056c 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -70,13 +70,11 @@ void __thermal_cdev_update(struct thermal_cooling_device *cdev); /** * struct thermal_trip - representation of a point in temperature domain - * @np: pointer to struct device_node that this trip point was created from * @temperature: temperature value in miliCelsius * @hysteresis: relative hysteresis in miliCelsius * @type: trip point type */ struct thermal_trip { - struct device_node *np; int temperature; int hysteresis; enum thermal_trip_type type; diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index d8b4a0ad2d5f..a8a3cb309822 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -855,10 +855,6 @@ static int thermal_of_populate_trip(struct device_node *np, return ret; } - /* Required for cooling map matching */ - trip->np = np; - of_node_get(np); - return 0; } @@ -988,8 +984,6 @@ __init *thermal_of_build_thermal_zone(struct device_node *np) kfree(tz->tbps); free_trips: - for (i = 0; i < tz->ntrips; i++) - of_node_put(tz->trips[i].np); kfree(tz->trips); of_node_put(gchild); free_tz: @@ -1014,8 +1008,6 @@ static __init void of_thermal_free_zone(struct __thermal_zone *tz) } kfree(tz->tbps); - for (i = 0; i < tz->ntrips; i++) - of_node_put(tz->trips[i].np); kfree(tz->trips); kfree(tz); }