flash/at91sam[37].c: remove useless declarations

Remove useless forward declarations.
Moves command registration to end of file.
Moves flash structure definitions to end of files.

Changes a few references to global flash structure to local refs.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
This commit is contained in:
Zachary T Welch
2009-11-09 09:20:33 -08:00
parent 770716e9e0
commit 4cd02c63e9
2 changed files with 44 additions and 53 deletions

View File

@@ -2508,19 +2508,16 @@ sam3_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
flash_driver_t at91sam3_flash =
{
.name = "at91sam3",
.register_commands = sam3_register_commands,
.flash_bank_command = sam3_flash_bank_command,
.erase = sam3_erase,
.protect = sam3_protect,
.write = sam3_write,
.probe = sam3_probe,
.auto_probe = sam3_auto_probe,
.erase_check = sam3_erase_check,
.protect_check = sam3_protect_check,
.info = sam3_info
};
flash_driver_t at91sam3_flash = {
.name = "at91sam3",
.register_commands = &sam3_register_commands,
.flash_bank_command = &sam3_flash_bank_command,
.erase = &sam3_erase,
.protect = &sam3_protect,
.write = &sam3_write,
.probe = &sam3_probe,
.auto_probe = &sam3_auto_probe,
.erase_check = &sam3_erase_check,
.protect_check = &sam3_protect_check,
.info = &sam3_info,
};