]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common: cmd_dfu: invoke board_usb_cleanup() for cleaning up
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 23 Feb 2015 13:10:18 +0000 (18:40 +0530)
committerMarek Vasut <marex@denx.de>
Tue, 14 Apr 2015 03:48:11 +0000 (05:48 +0200)
Invoked board_usb_cleanup for cleaning up initialized USB. It
will be invoked if the user enterts ctrl-C.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
common/cmd_dfu.c
common/usb.c

index e975abebc9a5fbd832a38980999e3d21d3bf44f5..161d38bf283d753d3b61efdfd86ca8450b4944ea 100644 (file)
@@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        }
 exit:
        g_dnl_unregister();
+       board_usb_cleanup(controller_index, USB_INIT_DEVICE);
 done:
        dfu_free_entities();
 
index bf76c4159341042a846efda075abe365c12f9833..d94640a99e866d168174be1f11e91428296ba196 100644 (file)
@@ -1090,4 +1090,10 @@ int board_usb_init(int index, enum usb_init_type init)
 {
        return 0;
 }
+
+__weak
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+       return 0;
+}
 /* EOF */