[PATCH 2/2] watchdog: imxwd: populate device pointer when registering restart handler

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jul 29 07:30:07 PDT 2024


To make it possible to select a specific i.MX watchdog by device name,
when multiple were registered, populate the new optional
struct restart_handler::dev member.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/watchdog/imxwd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index 616248af3863..2ec9d0d59635 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -306,6 +306,7 @@ static int imx_wd_probe(struct device *dev)
 	priv->restart.name = "imxwd";
 	priv->restart.restart = imxwd_force_soc_reset;
 	priv->restart.priority = RESTART_DEFAULT_PRIORITY;
+	priv->restart.dev = &priv->wd.dev;
 
 	restart_handler_register(&priv->restart);
 
-- 
2.39.2




More information about the barebox mailing list