mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
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 <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
This commit is contained in:
parent
04afd5b59b
commit
db378d786d
2 changed files with 7 additions and 0 deletions
|
@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
g_dnl_unregister();
|
g_dnl_unregister();
|
||||||
|
board_usb_cleanup(controller_index, USB_INIT_DEVICE);
|
||||||
done:
|
done:
|
||||||
dfu_free_entities();
|
dfu_free_entities();
|
||||||
|
|
||||||
|
|
|
@ -1090,4 +1090,10 @@ int board_usb_init(int index, enum usb_init_type init)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__weak
|
||||||
|
int board_usb_cleanup(int index, enum usb_init_type init)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Reference in a new issue