TSI148: Fix argument parsing
This patch does 2 things: - Fix the argument number assigned to the vdw (VME data width) value. Previously, a nonexistent 7th arument was read as the vdw variable. - Reduce the size of the argument array for the tsi148 command from 8 to 7. The tsi148 command itself is argument index 0, and the maximum number arguments passed to the command is 6, making a total of 7 for the array. Signed-off-by: Brent Darley <bdarley@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
This commit is contained in:
		
							parent
							
								
									52ebd9c1e5
								
							
						
					
					
						commit
						076f1be8e1
					
				|  | @ -419,7 +419,7 @@ int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||||||
| 	if (argc > 5) | 	if (argc > 5) | ||||||
| 		vam = simple_strtoul(argv[5], NULL, 16); | 		vam = simple_strtoul(argv[5], NULL, 16); | ||||||
| 	if (argc > 6) | 	if (argc > 6) | ||||||
| 		vdw = simple_strtoul(argv[7], NULL, 16); | 		vdw = simple_strtoul(argv[6], NULL, 16); | ||||||
| 
 | 
 | ||||||
| 	switch (cmd) { | 	switch (cmd) { | ||||||
| 	case 'c': | 	case 'c': | ||||||
|  | @ -465,7 +465,7 @@ int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| U_BOOT_CMD( | U_BOOT_CMD( | ||||||
| 	tsi148,	8,	1,	do_tsi148, | 	tsi148,	7,	1,	do_tsi148, | ||||||
| 	"initialize and configure Turndra Tsi148\n", | 	"initialize and configure Turndra Tsi148\n", | ||||||
| 	"init\n" | 	"init\n" | ||||||
| 	"    - initialize tsi148\n" | 	"    - initialize tsi148\n" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue