From: Kishon Vijay Abraham I Date: Mon, 23 Feb 2015 13:10:18 +0000 (+0530) Subject: common: cmd_dfu: invoke board_usb_cleanup() for cleaning up X-Git-Tag: v2015.07-rc1~370 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db378d786df0675aa6fc795a2198d000fddd33cc;p=oweals%2Fu-boot.git common: cmd_dfu: invoke board_usb_cleanup() for cleaning up 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 Reviewed-by: Lukasz Majewski --- diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index e975abebc9..161d38bf28 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c @@ -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(); diff --git a/common/usb.c b/common/usb.c index bf76c41593..d94640a99e 100644 --- a/common/usb.c +++ b/common/usb.c @@ -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 */