[PATCH] thermal: imx_sc_thermal: Drop empty platform remove function

Daniel Lezcano daniel.lezcano at linaro.org
Tue Dec 13 00:56:22 PST 2022


On 13/12/2022 09:13, Uwe Kleine-König wrote:
> Hello Daniel,
> 
> On Tue, Dec 13, 2022 at 08:46:45AM +0100, Daniel Lezcano wrote:
>> On 12/12/2022 23:02, Uwe Kleine-König wrote:
>>> A remove callback just returning 0 is equivalent to no remove callback
>>> at all. So drop the useless function.
>>
>> AFAIU, without the remove callback the module can not be unloaded, no?
> 
> This is a wrong expectation. As Marko already pointed out the relevant
> code path in platform_remove(), having no remove callback is equivalent
> to a remove callback that returns zero unconditionally.

In a previous discussion (don't remember which one) someone asserted a 
null remove callback will prevent the module removal like not having the 
exit module callback but I did not double check.

Thanks for the clarification.

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog




More information about the linux-arm-kernel mailing list