From: Stephen Warren Date: Wed, 4 Apr 2012 15:27:46 +0000 (-0600) Subject: dt: add property iteration helpers X-Git-Tag: v3.5-rc1~176^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c541adc637066407d4cda9db14dcb0e618966a4c;p=pandora-kernel.git dt: add property iteration helpers This patch adds macros of_property_for_each_u32() and of_property_for_each_string(), which iterate over an array of values within a device-tree property. Usage is for example: struct property *prop; const __be32 *p; u32 u; of_property_for_each_u32(np, "propname", prop, p, u) printk("U32 value: %x\n", u); struct property *prop; const char *s; of_property_for_each_string(np, "propname", prop, s) printk("String value: %s\n", s); Based on work by Rob Herring Cc: Grant Likely Signed-off-by: Stephen Warren Acked-by: Rob Herring Signed-off-by: Linus Walleij --- Reading git-diff-tree failed