pwm: Use of_property_read_bool()
PATCH 1/1 pwm: Use of_property_read_bool()
Use of_property_read_bool() to read boolean properties rather than of_get_property(). This is part of a larger effort to remove callers of of_get_property() and similar functions. of_get_property() leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.
--- drivers/pwm/pwm-omap-dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pwm/pwm-omap-dmtimer.c +1 -1
@@ -355,7 +355,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev) goto err_platdata; } -if (!of_get_property (timer,"ti,timer-pwm" ,NULL )) { +if (!of_property_read_bool (timer,"ti,timer-pwm" )) {dev_err (&pdev->dev,"Missing ti,timer-pwm capability\n" ); ret = -ENODEV ; goto err_timer_property;
Signature · 1 line
2.43.0
Hello,
Quoted 10 lines · Rob Herring (Arm)
Use
of_property_read_bool()to read boolean properties rather thanof_get_property(). This is part of a larger effort to remove callers ofof_get_property()and similar functions.of_get_property()leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/pwm/pwm-omap-dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Looks good to me. Unless you object I'd apply with adding "omap-dmtimer: " to the short log.
Best regards
Uwe
Quoted 10 lines · Uwe Kleine-König
Hello,
Quoted 6 lines · Rob Herring (Arm)
Use
of_property_read_bool()to read boolean properties rather thanof_get_property(). This is part of a larger effort to remove callers ofof_get_property()and similar functions.of_get_property()leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/pwm/pwm-omap-dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Looks good to me. Unless you object I'd apply with adding "omap-dmtimer: " to the short log.
No objection and sorry I missed that.
Rob
Quoted 17 lines · Rob Herring
Quoted 15 lines · Uwe Kleine-König
Hello,
Quoted 10 lines · Rob Herring (Arm)
Use
of_property_read_bool()to read boolean properties rather thanof_get_property(). This is part of a larger effort to remove callers ofof_get_property()and similar functions.of_get_property()leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/pwm/pwm-omap-dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Quoted 2 lines
Looks good to me. Unless you object I'd apply with adding "omap-dmtimer: " to the short log.
No objection and sorry I missed that.
No problem for me, applied with the mentioned change to the short log to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next .
Best regards
Uwe