nand/tcl: pass CMD to nand_list_walker()
To prepare for handling TCL return values consistently, all calls to command_print/command_print_sameline should be ready to switch to CMD as first parameter. Pass CMD instead of CMD_CTX as parameter to nand_list_walker(). This change was part of http://openocd.zylin.com/1815 from Paul Fertser and has been extracted and rebased to simplify the review. Change-Id: Ia11887dfc6dc58d5458a88ba84780cd895b8c253 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5053 Tested-by: jenkins
This commit is contained in:
parent
dae5a32c05
commit
962267ba1a
|
@ -501,15 +501,15 @@ COMMAND_HANDLER(handle_nand_init_command)
|
|||
|
||||
static int nand_list_walker(struct nand_flash_controller *c, void *x)
|
||||
{
|
||||
struct command_context *cmd_ctx = x;
|
||||
command_print(cmd_ctx, " %s", c->name);
|
||||
struct command_invocation *cmd = x;
|
||||
command_print(cmd->ctx, " %s", c->name);
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(handle_nand_list_drivers)
|
||||
{
|
||||
command_print(CMD_CTX, "Available NAND flash controller drivers:");
|
||||
return nand_driver_walk(&nand_list_walker, CMD_CTX);
|
||||
return nand_driver_walk(&nand_list_walker, CMD);
|
||||
}
|
||||
|
||||
static COMMAND_HELPER(create_nand_device, const char *bank_name,
|
||||
|
|
Loading…
Reference in New Issue