summaryrefslogtreecommitdiff
path: root/cmd/usb_mass_storage.c
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2018-11-29 10:52:41 +0100
committerMarek Vasut <marex@denx.de>2018-12-07 16:31:45 +0100
commita06955ae1ef2a942f18025d4fefceea2c638a76f (patch)
tree2796cd005202d59118724ce82b10f348b52e9654 /cmd/usb_mass_storage.c
parent57dbc151437b36cc1105857d222df28b095236d7 (diff)
usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers
Add 2 functions to wrap the calls to board_usb_init() and board_usb_cleanup(). This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'cmd/usb_mass_storage.c')
-rw-r--r--cmd/usb_mass_storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index 0d551141e0..753ae4f42a 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -160,7 +160,7 @@ static int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
controller_index = (unsigned int)(simple_strtoul(
usb_controller, NULL, 0));
- if (board_usb_init(controller_index, USB_INIT_DEVICE)) {
+ if (usb_gadget_initialize(controller_index)) {
pr_err("Couldn't init USB controller.\n");
rc = CMD_RET_FAILURE;
goto cleanup_ums_init;
@@ -231,7 +231,7 @@ static int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
cleanup_register:
g_dnl_unregister();
cleanup_board:
- board_usb_cleanup(controller_index, USB_INIT_DEVICE);
+ usb_gadget_release(controller_index);
cleanup_ums_init:
ums_fini();