From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] usb: gadget: dfu: detect devices when necessary
Date: Mon, 20 Jan 2025 14:28:29 +0100 [thread overview]
Message-ID: <20250120132829.4176408-1-s.hauer@pengutronix.de> (raw)
the DFU file list might refer to devices which are not yet detected.
Call detect on the devices on the list to make sure they are present
when DFU is started.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/gadget/function/dfu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/dfu.c b/drivers/usb/gadget/function/dfu.c
index 44a6ec1aa6..893dcc7f70 100644
--- a/drivers/usb/gadget/function/dfu.c
+++ b/drivers/usb/gadget/function/dfu.c
@@ -372,6 +372,8 @@ dfu_bind(struct usb_configuration *c, struct usb_function *f)
dfu_files = opts->files;
}
+ file_list_detect_all(dfu_files);
+
n_entries = list_count_nodes(&dfu_files->list);
dfu_string_defs = xzalloc(sizeof(struct usb_string) * (n_entries + 2));
--
2.39.5
next reply other threads:[~2025-01-20 13:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 13:28 Sascha Hauer [this message]
2025-01-21 8:32 ` 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=20250120132829.4176408-1-s.hauer@pengutronix.de \
--to=s.hauer@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