From: Antonio Borneo Date: Sat, 10 Apr 2010 13:50:15 +0000 (+0800) Subject: NAND/TCL: review scope of functions X-Git-Tag: v0.5.0-rc1~763 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c936cb334b9e60c3326675912c97faafb379d3ed;p=openocd NAND/TCL: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo --- diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h index e4fb18bb..a8e7466a 100644 --- a/src/flash/nand/core.h +++ b/src/flash/nand/core.h @@ -221,7 +221,6 @@ int nand_calculate_ecc_kw(struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code); int nand_register_commands(struct command_context *cmd_ctx); -int nand_init(struct command_context *cmd_ctx); /// helper for parsing a nand device command argument string COMMAND_HELPER(nand_command_get_device, unsigned name_index, diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 29b4b69d..86dbd678 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -512,7 +512,7 @@ static const struct command_registration nand_exec_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -int nand_init(struct command_context *cmd_ctx) +static int nand_init(struct command_context *cmd_ctx) { if (!nand_devices) return ERROR_OK; @@ -536,12 +536,14 @@ COMMAND_HANDLER(handle_nand_init_command) LOG_DEBUG("Initializing NAND devices..."); return nand_init(CMD_CTX); } -int nand_list_walker(struct nand_flash_controller *c, void *x) + +static int nand_list_walker(struct nand_flash_controller *c, void *x) { struct command_context *cmd_ctx = (struct command_context *)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:");