mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] usb: gadget: dfu: Use func_to_dfu
@ 2021-02-08 16:34 Jules Maselbas
  2021-02-08 16:34 ` [PATCH 2/3] usb: gadget: dfu: Wrap fs operation in workqueue Jules Maselbas
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jules Maselbas @ 2021-02-08 16:34 UTC (permalink / raw)
  To: barebox; +Cc: Jules Maselbas, Ahmad Fatoum

Replace the uses of container_of with func_to_dfu when available.

Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
---
 drivers/usb/gadget/dfu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c
index 7e23fa315..9d6a9d252 100644
--- a/drivers/usb/gadget/dfu.c
+++ b/drivers/usb/gadget/dfu.c
@@ -181,7 +181,7 @@ dfu_bind(struct usb_configuration *c, struct usb_function *f)
 	struct usb_descriptor_header **header;
 	struct usb_interface_descriptor *desc;
 	struct file_list_entry *fentry;
-	struct f_dfu *dfu = container_of(f, struct f_dfu, func);
+	struct f_dfu *dfu = func_to_dfu(f);
 	int i;
 	int			status;
 	struct usb_string	*us;
@@ -863,7 +863,7 @@ out:
 
 static void dfu_free_func(struct usb_function *f)
 {
-	struct f_dfu *dfu = container_of(f, struct f_dfu, func);
+	struct f_dfu *dfu = func_to_dfu(f);
 
 	free(dfu);
 }
-- 
2.17.1



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2021-03-01 16:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 16:34 [PATCH 1/3] usb: gadget: dfu: Use func_to_dfu Jules Maselbas
2021-02-08 16:34 ` [PATCH 2/3] usb: gadget: dfu: Wrap fs operation in workqueue Jules Maselbas
2021-02-15 14:18   ` [PATCH v2 1/2] usb: gadget: dfu: Rework print messages Jules Maselbas
2021-02-15 14:18     ` [PATCH v2 2/2] usb: gadget: dfu: Wrap fs operation in workqueue Jules Maselbas
2021-03-01  9:30       ` [PATCH 1/2] fixup! " Jules Maselbas
2021-03-01  9:30         ` [PATCH 2/2] " Jules Maselbas
2021-03-01 16:03         ` [PATCH 1/2] " Sascha Hauer
2021-03-01 16:06           ` Jules Maselbas
2021-02-16  9:19     ` [PATCH v2 1/2] usb: gadget: dfu: Rework print messages Bartosz Bilas
2021-02-16  9:27       ` Sascha Hauer
2021-02-16  9:51         ` Jules Maselbas
2021-02-16  9:49       ` Jules Maselbas
2021-02-08 16:34 ` [PATCH 3/3] usb: gadget: dfu: Replace printf with pr_err Jules Maselbas
2021-02-10  9:51   ` Ahmad Fatoum
2021-02-10  9:44 ` [PATCH 1/3] usb: gadget: dfu: Use func_to_dfu Sascha Hauer

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