mirror of
https://github.com/FunKey-Project/fkgpiod.git
synced 2026-01-29 11:05:26 +01:00
reverse SAVE order
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
ade0faf098
commit
5b62d09a7e
@ -69,6 +69,10 @@
|
||||
#define list_for_each(pos, head) \
|
||||
for (pos = (head)->next; pos != (head); pos = pos->next)
|
||||
|
||||
/* Loop over the list nodes backwards */
|
||||
#define list_for_each_prev(pos, head) \
|
||||
for (pos = (head)->prev; pos != (head); pos = pos->prev)
|
||||
|
||||
/* Loop over the nodes of a list, the node may be destroyed safely during the
|
||||
* process
|
||||
*/
|
||||
@ -337,7 +341,7 @@ void save_mapping_list(mapping_list_t *list)
|
||||
mapping_t *tmp;
|
||||
|
||||
printf("CLEAR\n");
|
||||
list_for_each(p, list) {
|
||||
list_for_each_prev(p, list) {
|
||||
tmp = list_entry(p, mapping_t, mappings);
|
||||
save_mapping(tmp);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user