[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2bbabc8c-415e-1fc9-3551-00fedc8bc78a@roeck-us.net>
Date: Mon, 6 Mar 2023 07:23:29 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] watchdog: s3c2410_wdt: Use devm_add_action_or_reset()
to disable watchdog
On 3/6/23 01:15, Uwe Kleine-König wrote:
> On Sat, Mar 04, 2023 at 08:56:53AM -0800, Guenter Roeck wrote:
>> Use devm_add_action_or_reset() to disable the watchdog when the driver
>> is removed to simplify the code. With this in place, we can use
>> devm_watchdog_register_device() to register the watchdog, and the removal
>> function is no longer necessary.
>
> While the cleanup in this driver is good (
> Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> ) I wonder if disabling the watchdog at .remove() is right.
>
> At least there is an inconsistency among watchdog drivers if the
> hardware is supposed to stop or not.
>
Yes, it is, and it is one of those endless-argument things. Some driver
authors insist that the watchdog be stopped, some insist that it isn't.
That is why we have watchdog_stop_on_unregister().
Note I didn't use that here because the watchdog isn't stopped on unregister
but just disabled. That is slightly different, and I didn't want to change
functionality.
Guenter
Powered by blists - more mailing lists