remove flash_driver->register_callbacks

Replace flash_driver callback with pointer to command_registration.
Eliminates all related routines and allows drivers to omit commands.
This commit is contained in:
Zachary T Welch
2009-11-22 06:12:04 -08:00
parent 6b9bb584a5
commit ad090413a8
17 changed files with 25 additions and 105 deletions
+1 -6
View File
@@ -696,14 +696,9 @@ static const struct command_registration str9x_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static int str9x_register_commands(struct command_context *cmd_ctx)
{
return register_commands(cmd_ctx, NULL, str9x_command_handlers);
}
struct flash_driver str9x_flash = {
.name = "str9x",
.register_commands = &str9x_register_commands,
.commands = str9x_command_handlers,
.flash_bank_command = &str9x_flash_bank_command,
.erase = &str9x_erase,
.protect = &str9x_protect,