Skip to content

Commit

Permalink
drivers/mtd: fix the order in the MTD pointer XFA
Browse files Browse the repository at this point in the history
The commit fixes the order of entries in the MTD pointer XFA `mtd_dev_xfa` according to their index by using the index as the priority in the XFA.
  • Loading branch information
gschorcht committed Nov 27, 2023
1 parent 73bde97 commit ff79f39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/include/mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ mtd_dev_t * const mtd_dev_xfa[];
* @param dev MTD device
* @param idx Priority of the MTD device pointer within the XFA
*/
#define MTD_XFA_ADD(dev, idx) XFA_CONST(mtd_dev_xfa, 0) mtd_dev_t *mtd ## idx = (mtd_dev_t *)&(dev)
#define MTD_XFA_ADD(dev, idx) \
XFA_CONST(mtd_dev_xfa, idx) mtd_dev_t *mtd ## idx = (mtd_dev_t *)&(dev)

/**
* @brief Number of MTDs defined in the MTD device array in XFA
Expand Down

0 comments on commit ff79f39

Please sign in to comment.