mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-05 00:08:32 -04:00
clk: lmk04832: Simplify with scoped for each OF child loop
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
committed by
Stephen Boyd
parent
8f0b4cce44
commit
47231ba4cb
@@ -1400,7 +1400,6 @@ static int lmk04832_probe(struct spi_device *spi)
|
||||
{
|
||||
const struct lmk04832_device_info *info;
|
||||
int rdbk_pin = RDBK_CLKIN_SEL1;
|
||||
struct device_node *child;
|
||||
struct lmk04832 *lmk;
|
||||
u8 tmp[3];
|
||||
int ret;
|
||||
@@ -1462,14 +1461,13 @@ static int lmk04832_probe(struct spi_device *spi)
|
||||
device_property_read_u32(lmk->dev, "ti,sysref-pulse-count",
|
||||
&lmk->sysref_pulse_cnt);
|
||||
|
||||
for_each_child_of_node(lmk->dev->of_node, child) {
|
||||
for_each_child_of_node_scoped(lmk->dev->of_node, child) {
|
||||
int reg;
|
||||
|
||||
ret = of_property_read_u32(child, "reg", ®);
|
||||
if (ret) {
|
||||
dev_err(lmk->dev, "missing reg property in child: %s\n",
|
||||
child->full_name);
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user