diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2010-04-10 21:50:15 +0800 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2010-04-10 21:50:15 +0800 |
commit | c936cb334b9e60c3326675912c97faafb379d3ed (patch) | |
tree | 2c4953b60a4e77502bb4a706dde4ade64ae7fa60 /src | |
parent | 5926b5a94fd4e29e0e020c2f87b542fd51bd5d6f (diff) | |
download | openocd_libswd-c936cb334b9e60c3326675912c97faafb379d3ed.tar.gz openocd_libswd-c936cb334b9e60c3326675912c97faafb379d3ed.tar.bz2 openocd_libswd-c936cb334b9e60c3326675912c97faafb379d3ed.tar.xz openocd_libswd-c936cb334b9e60c3326675912c97faafb379d3ed.zip |
NAND/TCL: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/flash/nand/core.h | 1 | ||||
-rw-r--r-- | src/flash/nand/tcl.c | 6 |
2 files changed, 4 insertions, 3 deletions
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:"); |