Messages in this thread | | | Date | Sat, 11 Feb 2012 22:50:40 -0800 | From | Dong Aisheng <> | Subject | Re: [PATCH V3 1/1] dt: add of_get_child_count helper function |
| |
On Sun, Feb 12, 2012 at 12:37:46AM +0400, Sergei Shtylyov wrote: > >diff --git a/include/linux/of.h b/include/linux/of.h > >index a75a831..ae242ef 100644 > >--- a/include/linux/of.h > >+++ b/include/linux/of.h > >@@ -195,6 +195,17 @@ extern struct device_node *of_get_next_child(const struct device_node *node, > > for (child = of_get_next_child(parent, NULL); child != NULL; \ > > child = of_get_next_child(parent, child)) > > > >+static inline int of_get_child_count(const struct device_node *np) > >+{ > >+ struct device_node *child = NULL; > >+ int num = 0; > >+ > >+ while ((child = of_get_next_child(np, child)) != NULL) > > Doesn't scripts/checkpatch.pl complain here? > That complain actually is not caused by this patch. I have already sent a patch to fix that issue. But seemed to get a NACK. Please refer to: https://lkml.org/lkml/2011/12/20/236
Regards Dong Aisheng
| |