nand: add NAND_DEVICE_COMMAND_HANDLER macro

Abstracts the extended NAND command handling to allow the function
signature to be controlled by __COMMAND_HANDLER.
This commit is contained in:
Zachary T Welch
2009-11-10 00:53:40 -08:00
parent 0796dfff89
commit 670f999e7a
9 changed files with 14 additions and 23 deletions

View File

@@ -61,9 +61,7 @@ static int imx31_command (struct nand_device_s *nand, uint8_t command);
static int imx31_address (struct nand_device_s *nand, uint8_t address);
static int imx31_controller_ready (struct nand_device_s *nand, int tout);
static int imx31_nand_device_command (struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc,
struct nand_device_s *nand)
NAND_DEVICE_COMMAND_HANDLER(imx31_nand_device_command)
{
mx3_nf_controller_t *mx3_nf_info;
mx3_nf_info = malloc (sizeof (mx3_nf_controller_t));