[PATCH 07/20] bus: ti-sysc: convert to of_property_for_each_u32_new()
Luca Ceresoli
luca.ceresoli at bootlin.com
Wed Jul 3 20:36:51 AEST 2024
Simplify code using of_property_for_each_u32_new() as the two additional
parameters in of_property_for_each_u32() are not used here.
Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
---
drivers/bus/ti-sysc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 8767e04d6c89..3d19777f1e31 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -2291,11 +2291,9 @@ static int sysc_init_idlemode(struct sysc *ddata, u8 *idlemodes,
const char *name)
{
struct device_node *np = ddata->dev->of_node;
- struct property *prop;
- const __be32 *p;
u32 val;
- of_property_for_each_u32(np, name, prop, p, val) {
+ of_property_for_each_u32_new(np, name, val) {
if (val >= SYSC_NR_IDLEMODES) {
dev_err(ddata->dev, "invalid idlemode: %i\n", val);
return -EINVAL;
--
2.34.1
More information about the Linuxppc-dev
mailing list