From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 1/3] reset_source: have reset_source_set_device actually set device
Date: Mon, 25 Nov 2024 09:30:40 +0100 [thread overview]
Message-ID: <20241125083042.482415-1-a.fatoum@pengutronix.de> (raw)
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>
---
v1 -> v2:
- no change
---
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
next reply other threads:[~2024-11-25 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 8:30 Ahmad Fatoum [this message]
2024-11-25 8:30 ` [PATCH v2 2/3] mfd: rn5t568: refactor to call reset_source_set_device only once Ahmad Fatoum
2024-11-25 8:30 ` [PATCH v2 3/3] reset_source: give reset_source_set_device a priority parameter Ahmad Fatoum
2024-11-25 8:43 ` [PATCH v2 1/3] reset_source: have reset_source_set_device actually set device Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241125083042.482415-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox