projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96545da
)
backports: add idr_for_each_entry()
author
Johannes Berg
<johannes.berg@intel.com>
Tue, 7 Feb 2017 13:12:19 +0000
(14:12 +0100)
committer
Johannes Berg
<johannes.berg@intel.com>
Tue, 7 Feb 2017 14:07:21 +0000
(15:07 +0100)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/backport-include/linux/idr.h
patch
|
blob
|
history
diff --git
a/backport/backport-include/linux/idr.h
b/backport/backport-include/linux/idr.h
index 737632bf5e7332d1ccac51a3f7ac80f22749c19e..d4ad95224ba87e0715008cb947e0dc0f5a434a72 100644
(file)
--- a/
backport/backport-include/linux/idr.h
+++ b/
backport/backport-include/linux/idr.h
@@
-56,4
+56,9
@@
static inline void idr_preload_end(void)
}
#endif
+#ifndef idr_for_each_entry
+#define idr_for_each_entry(idp, entry, id) \
+ for (id = 0; ((entry) = idr_get_next(idp, &(id))) != NULL; ++id)
+#endif
+
#endif /* __BACKPORT_IDR_H */