[PATCH 15/20] fastboot: init list head in common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The list of variables can be initialized in common code, no need to do
the in the different implementations.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/fastboot.c               | 2 ++
 drivers/usb/gadget/f_fastboot.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/fastboot.c b/common/fastboot.c
index 10ebb8b2a9..3f61208a21 100644
--- a/common/fastboot.c
+++ b/common/fastboot.c
@@ -171,6 +171,8 @@ int fastboot_generic_init(struct fastboot *fb, bool export_bbu)
 	struct file_list_entry *fentry;
 	struct fb_variable *var;
 
+	INIT_LIST_HEAD(&fb->variables);
+
 	var = fb_addvar(fb, "version");
 	fb_setvar(var, "0.4");
 	var = fb_addvar(fb, "bootloader-version");
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index f8a9c32530..35ad351f73 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -313,8 +313,6 @@ static struct usb_function *fastboot_alloc_func(struct usb_function_instance *fi
 
 	f_fb = xzalloc(sizeof(*f_fb));
 
-	INIT_LIST_HEAD(&f_fb->fastboot.variables);
-
 	f_fb->func.name = "fastboot";
 	f_fb->func.strings = fastboot_strings;
 	f_fb->func.bind = fastboot_bind;
-- 
2.28.0


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux