]> git.sur5r.net Git - openocd/commitdiff
NAND/TCL: review scope of functions
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 10 Apr 2010 13:50:15 +0000 (21:50 +0800)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 10 Apr 2010 13:50:15 +0000 (21:50 +0800)
Add "static" qualifier to private functions.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
src/flash/nand/core.h
src/flash/nand/tcl.c

index e4fb18bb9a0d83f5055e4ddf02b83bdcfa184752..a8e7466a4fee2c0a73eaa980b424f4a14b51ddfc 100644 (file)
@@ -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,
index 29b4b69dda73ecc9293fcbe3bf42ee1be564c8b2..86dbd6788ee87fad47e68dbe4019e3858bc89884 100644 (file)
@@ -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:");