thor: defer parsing of device string to IO backend
Commit d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed
the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c
to match that change.
Also, apply the same change as commit d6d37d737b58e "dfu: free entities
when parsing fails" to cmd_thordown.c.
Fixes: d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
			
			
This commit is contained in:
		
							parent
							
								
									50a3532128
								
							
						
					
					
						commit
						90fadb5723
					
				|  | @ -26,10 +26,9 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||||||
| 
 | 
 | ||||||
| 	puts("TIZEN \"THOR\" Downloader\n"); | 	puts("TIZEN \"THOR\" Downloader\n"); | ||||||
| 
 | 
 | ||||||
| 	ret = dfu_init_env_entities(interface, simple_strtoul(devstring, | 	ret = dfu_init_env_entities(interface, devstring); | ||||||
| 							      NULL, 10)); |  | ||||||
| 	if (ret) | 	if (ret) | ||||||
| 		return ret; | 		goto done; | ||||||
| 
 | 
 | ||||||
| 	int controller_index = simple_strtoul(usb_controller, NULL, 0); | 	int controller_index = simple_strtoul(usb_controller, NULL, 0); | ||||||
| 	ret = board_usb_init(controller_index, USB_INIT_DEVICE); | 	ret = board_usb_init(controller_index, USB_INIT_DEVICE); | ||||||
|  | @ -57,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||||||
| 
 | 
 | ||||||
| exit: | exit: | ||||||
| 	g_dnl_unregister(); | 	g_dnl_unregister(); | ||||||
|  | done: | ||||||
| 	dfu_free_entities(); | 	dfu_free_entities(); | ||||||
| 
 | 
 | ||||||
| 	return ret; | 	return ret; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue