Re: [PATCH v2] watchdog: take all OF aliases into account when assigning id

Guenter Roeck <[email protected]> Mon, 20 Jul 2026 09:27:51 -0700
Newsgroups org.kernel.vger.linux-watchdog,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Jul 14, 2026 at 12:53:56PM +0200, Rasmus Villemoes wrote:
> If some, but not all, watchdog devices have device tree aliases, those
> without aliases might (depending on probe order) be assigned an id
> which would otherwise be assigned to one of those with an alias.
> 
> This is problematic when for example watchdog0 is an alias for an
> always-running gpio watchdog that userspace must handle, but the SOC's
> watchdog device(s) get probed first and thus one of those become
> /dev/watchdog0, and then at some point later, the gpio watchdog device
> gets probed and becomes /dev/watchdog5.
> 
> Ensure that ids for devices without a device tree alias are allocated
> from among those where no watchdogX alias exists.
> 
> Signed-off-by: Rasmus Villemoes <[email protected]>

Applied.

Thanks,
Guenter