From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2C9523A5 for ; Wed, 22 Feb 2023 09:32:09 +0000 (UTC) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id B776866021B5; Wed, 22 Feb 2023 09:31:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677058321; bh=ypc2TjbNSU7dsJCUFEveVUwkvQ3RanGmsWbkzF7sWgo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FNUVhOeaDNZZVi6pZQ6VK2lEs7a/M+4teR0YM9KUip7qVBhKutdX2Zy5nYfzcsOw/ djyt2EwIP5Di/RZRdmEMzeMePbU80C0D67C7pzmY3I+ERCTLfaiuXS0VslS+F5WaQf fjBUKZFaOPp8MNRri82Y6HG0SawCtkD28MTQdNV3Ngc9lm+Y7QvVyAYXZkPONKGGR3 //lqrmT+fnoduRyAOcor6oP/m+ktaSMj/YwcK6jU0HJ5AVhr5fHJkV6I6p37l2uCTI uK1G4sXntFRI6/e2q9TLw+v7lgGy9Qq0NJ20hPk63AyJ776C9yOMTdEfDrBHBaptWP uWZWkFvCBsZtA== Message-ID: Date: Wed, 22 Feb 2023 10:31:57 +0100 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2 05/16] thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() Content-Language: en-US To: Daniel Lezcano , rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , Guillaume La Roque , Amit Kucheria , Zhang Rui , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Bjorn Andersson , Konrad Dybcio , Thara Gopinath , Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , Eduardo Valentin , Keerthy , Matthias Brugger , Balsam CHIHI , Daniel Golle , =?UTF-8?Q?Niklas_S=c3=b6derlund?= , ye xingchen , Randy Dunlap , Adam Ward , Neil Armstrong , Mark Brown , "open list:THERMAL DRIVER FOR AMLOGIC SOCS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "open list:ARM/QUALCOMM SUPPORT" , "open list:ARM/Allwinner sunXi SoC support" , "open list:TEGRA ARCHITECTURE SUPPORT" , "open list:TI BANDGAP AND THERMAL DRIVER" , "moderated list:ARM/Mediatek SoC support" References: <20230221180710.2781027-1-daniel.lezcano@linaro.org> <20230221180710.2781027-6-daniel.lezcano@linaro.org> From: AngeloGioacchino Del Regno In-Reply-To: <20230221180710.2781027-6-daniel.lezcano@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 21/02/23 19:06, Daniel Lezcano ha scritto: > 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 > Acked-by: Martin Blumenstingl #amlogic_thermal Reviewed-by: AngeloGioacchino Del Regno #MediaTek auxadc