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

From: Guenter Roeck

Date: Mon Jul 20 2026 - 12:32:14 EST


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 <linux@xxxxxxxxxxxxxxxxxx>

Applied.

Thanks,
Guenter