flash/nor: remove empty command definitions

The value of struct flash_driver::command can be NULL when the
flash driver does not need to add any new command.

Remove empty command definitions.

Change-Id: I5413967d4069030234469822d24e9825425ae012
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7120
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2022-08-16 11:42:32 +02:00
parent 424f9f6796
commit 7bc4e67d65
3 changed files with 0 additions and 64 deletions

View File

@@ -811,24 +811,8 @@ FLASH_BANK_COMMAND_HANDLER(psoc5lp_nvl_flash_bank_command)
return ERROR_OK;
}
static const struct command_registration psoc5lp_nvl_exec_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static const struct command_registration psoc5lp_nvl_command_handlers[] = {
{
.name = "psoc5lp_nvl",
.mode = COMMAND_ANY,
.help = "PSoC 5LP NV Latch command group",
.usage = "",
.chain = psoc5lp_nvl_exec_command_handlers,
},
COMMAND_REGISTRATION_DONE
};
const struct flash_driver psoc5lp_nvl_flash = {
.name = "psoc5lp_nvl",
.commands = psoc5lp_nvl_command_handlers,
.flash_bank_command = psoc5lp_nvl_flash_bank_command,
.info = psoc5lp_nvl_get_info_command,
.probe = psoc5lp_nvl_probe,
@@ -1010,24 +994,8 @@ FLASH_BANK_COMMAND_HANDLER(psoc5lp_eeprom_flash_bank_command)
return ERROR_OK;
}
static const struct command_registration psoc5lp_eeprom_exec_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static const struct command_registration psoc5lp_eeprom_command_handlers[] = {
{
.name = "psoc5lp_eeprom",
.mode = COMMAND_ANY,
.help = "PSoC 5LP EEPROM command group",
.usage = "",
.chain = psoc5lp_eeprom_exec_command_handlers,
},
COMMAND_REGISTRATION_DONE
};
const struct flash_driver psoc5lp_eeprom_flash = {
.name = "psoc5lp_eeprom",
.commands = psoc5lp_eeprom_command_handlers,
.flash_bank_command = psoc5lp_eeprom_flash_bank_command,
.info = psoc5lp_eeprom_get_info_command,
.probe = psoc5lp_eeprom_probe,