mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] reset_source: have reset_source_set_device actually set device
@ 2024-11-20 13:06 Ahmad Fatoum
  2024-11-20 13:06 ` [PATCH 2/3] mfd: rn5t568: refactor to call reset_source_set_device only once Ahmad Fatoum
  2024-11-20 13:06 ` [PATCH 3/3] reset_source: give reset_source_set_device a priority parameter Ahmad Fatoum
  0 siblings, 2 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-11-20 13:06 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

reset_source_set_device is given a device pointer as argument and it
passes it to __reset_source_set, but the latter function discards the
argument and unconditionally stores a NULL into the reset_source_device.

Fix this by actually making use of the argument.

Fixes: a0748840c104 ("reset_source: implement helper to set a device as reset source")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/reset_source.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/reset_source.c b/common/reset_source.c
index f28be90dcbb4..495f3d527a84 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -61,7 +61,7 @@ static void __reset_source_set(struct device *dev,
 	reset_source = st;
 	reset_source_priority = priority;
 	reset_source_instance = instance;
-	reset_source_device = NULL;
+	reset_source_device = dev;
 
 	pr_debug("Setting reset source to %s with priority %d\n",
 			reset_src_names[reset_source], priority);
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-25  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-20 13:06 [PATCH 1/3] reset_source: have reset_source_set_device actually set device Ahmad Fatoum
2024-11-20 13:06 ` [PATCH 2/3] mfd: rn5t568: refactor to call reset_source_set_device only once Ahmad Fatoum
2024-11-25  8:20   ` Sascha Hauer
2024-11-20 13:06 ` [PATCH 3/3] reset_source: give reset_source_set_device a priority parameter Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox