[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCAm+pFuuJEL3_2B3o3ZaLWxb-JqHhxY0vJfb8ZfxKOieQ@mail.gmail.com>
Date: Sun, 19 Feb 2023 18:26:22 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: rafael@...nel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Guillaume La Roque <glaroque@...libre.com>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Thara Gopinath <thara.gopinath@...il.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Vasily Khoruzhick <anarsoul@...il.com>,
Yangtao Li <tiny.windzz@...il.com>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Eduardo Valentin <edubezval@...il.com>,
Keerthy <j-keerthy@...com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Daniel Golle <daniel@...rotopia.org>,
ye xingchen <ye.xingchen@....com.cn>,
Randy Dunlap <rdunlap@...radead.org>,
Balsam CHIHI <bchihi@...libre.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
"open list:THERMAL DRIVER FOR AMLOGIC SOCS"
<linux-amlogic@...ts.infradead.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
"open list:QUALCOMM TSENS THERMAL DRIVER"
<linux-arm-msm@...r.kernel.org>,
"open list:ARM/Allwinner sunXi SoC support"
<linux-sunxi@...ts.linux.dev>,
"open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>,
"open list:TI BANDGAP AND THERMAL DRIVER"
<linux-omap@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v1 05/17] thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()
On Sun, Feb 19, 2023 at 3:38 PM Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
>
> The devres variant of thermal_add_hwmon_sysfs() only takes the thermal
> zone structure pointer as parameter.
>
> Actually, it uses the tz->device to add it in the devres list.
>
> It is preferable to use the device registering the thermal zone
> instead of the thermal zone device itself. That prevents the driver
> accessing the thermal zone structure internals and it is from my POV
> more correct regarding how devm_ is used.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---
> drivers/thermal/amlogic_thermal.c | 2 +-
For amlogic_thermal.c:
Acked-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Powered by blists - more mailing lists