diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-07-04 09:15:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-07-05 16:22:36 +0200 |
commit | bdd472c2af454e11933cbab674448aebd58341c4 (patch) | |
tree | d742308a4bdee34f393b55f87d7dc763d133f1f3 /include | |
parent | f7ea95b4f71ce6b7d5b86537e0a9b771a12fec1a (diff) | |
download | barebox-bdd472c2af454e11933cbab674448aebd58341c4.tar.gz barebox-bdd472c2af454e11933cbab674448aebd58341c4.tar.xz |
Revert "of: Add of_property_for_each_phandle() iterator"
Codebase is meant to be gnu89, but this was only enforced starting
with bc4840e98b94 ("kbuild: add -Wmissing-prototypes and -std=gnu89
to KBUILD_HOSTCFLAGS"). Since then, use of this macro would yield a
compile error, because of the initialization inside the for-loop,
which is a C99 feature. There hasn't been any users for the macro
since it was added in 2016, thus drop it.
This reverts commit d5f9415b04846661522141ea428f74e3c618fa9e.
Cc: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/of.h b/include/of.h index 08bbeaf4d2..d548e51789 100644 --- a/include/of.h +++ b/include/of.h @@ -902,17 +902,6 @@ static inline int of_property_read_u32(const struct device_node *np, s; \ s = of_prop_next_string(prop, s)) -/* - * struct device_node *n; - * - * of_property_for_each_phandle(np, root, "propname", n) - * printk("phandle points to: %s\n", n->full_name); - */ -#define of_property_for_each_phandle(np, root, propname, n) \ - for (int _i = 0; \ - (n = of_parse_phandle_from(np, root, propname, _i));\ - _i++) - static inline int of_property_write_u8(struct device_node *np, const char *propname, u8 value) { |