diff options
author | Marek Vasut <marex@denx.de> | 2023-09-01 11:49:53 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2023-09-15 23:38:02 +0200 |
commit | 76dd459487444fab1aabee848053df9d993efa1d (patch) | |
tree | ab3362438a0e5a142ad2f490ecfa673eda4bb6f4 | |
parent | 37fb7cb7f815a99266e8b5beb55f99e33396dcf5 (diff) | |
download | u-boot-76dd459487444fab1aabee848053df9d993efa1d.tar.gz u-boot-76dd459487444fab1aabee848053df9d993efa1d.tar.bz2 u-boot-76dd459487444fab1aabee848053df9d993efa1d.zip |
cmd: thordown: Reorder variable declaration
Move the variable declaration around to improve code readability.
No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-rw-r--r-- | cmd/thordown.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/thordown.c b/cmd/thordown.c index 838764ccef..0d8dcee531 100644 --- a/cmd/thordown.c +++ b/cmd/thordown.c @@ -15,22 +15,23 @@ int do_thor_down(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { + char *interface, *devstring; + int controller_index; + int ret; + if (argc < 4) return CMD_RET_USAGE; - char *usb_controller = argv[1]; - char *interface = argv[2]; - char *devstring = argv[3]; - - int ret; - puts("TIZEN \"THOR\" Downloader\n"); + interface = argv[2]; + devstring = argv[3]; + ret = dfu_init_env_entities(interface, devstring); if (ret) goto done; - int controller_index = simple_strtoul(usb_controller, NULL, 0); + controller_index = simple_strtoul(argv[1], NULL, 0); ret = usb_gadget_initialize(controller_index); if (ret) { pr_err("USB init failed: %d\n", ret); |