1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/mtd: fix the order in the MTD pointer XFA

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.
This commit is contained in:
Gunar Schorcht 2023-11-27 16:59:13 +01:00
parent 73bde97e9d
commit ff79f39fd5

View File

@ -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