allow #include directives to use module name
[fw/openocd] / src / flash / flash.h
index 1235a419ecf016469d4d8668a9833721ce9d22ac..92727bf9e998824cc26db1b0833efdfce346a5a3 100644 (file)
@@ -91,13 +91,11 @@ struct flash_driver
        char *name;
 
        /**
-        * Registers driver-specific commands.  When called (during the
-        * "flash bank" command), the driver may register addition
+        * An array of driver-specific commands to register.  When called
+        * during the "flash bank" command, the driver can register addition
         * commands to support new flash chip functions.
-        *
-        * @returns ERROR_OK if successful; otherwise, an error code.
         */
-       int (*register_commands)(struct command_context *cmd_ctx);
+       const struct command_registration *commands;
 
        /**
         * Finish the "flash bank" command for @a bank.  The
@@ -240,6 +238,8 @@ struct flash_driver
  */
 struct flash_bank
 {
+       char *name;
+
        struct target *target; /**< Target to which this bank belongs. */
 
        struct flash_driver *driver; /**< Driver for this bank. */