From ad090413a8dfacccc993ff15b8376e0f2bd56712 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Sun, 22 Nov 2009 06:12:04 -0800 Subject: remove flash_driver->register_callbacks Replace flash_driver callback with pointer to command_registration. Eliminates all related routines and allows drivers to omit commands. --- src/flash/lpc2900.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/flash/lpc2900.c') diff --git a/src/flash/lpc2900.c b/src/flash/lpc2900.c index 0d961e47..81e2def4 100644 --- a/src/flash/lpc2900.c +++ b/src/flash/lpc2900.c @@ -1003,15 +1003,6 @@ static const struct command_registration lpc2900_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -/** - * Register private command handlers. - */ -static int lpc2900_register_commands(struct command_context *cmd_ctx) -{ - return register_commands(cmd_ctx, NULL, lpc2900_command_handlers); -} - - /// Evaluate flash bank command. FLASH_BANK_COMMAND_HANDLER(lpc2900_flash_bank_command) { @@ -1830,7 +1821,7 @@ static int lpc2900_info(struct flash_bank *bank, char *buf, int buf_size) struct flash_driver lpc2900_flash = { .name = "lpc2900", - .register_commands = lpc2900_register_commands, + .commands = lpc2900_command_handlers, .flash_bank_command = lpc2900_flash_bank_command, .erase = lpc2900_erase, .protect = lpc2900_protect, -- cgit v1.2.3