mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
pwm: Fix pwm_apply_args() call sites
pwm_apply_args() is supposed to initialize a PWM device according to the arguments provided by the DT or the PWM lookup, but this function was called inside pwm_device_request(), which in turn was called before the core had a chance to initialize the pwm->args fields. Fix that by calling pwm_apply_args directly in pwm_get() and of_pwm_get() after initializing pwm->args field. This commit also fixes an invalid pointer dereference introduced by commite39c0df1be("pwm: Introduce the pwm_args concept"). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes:e39c0df1be("pwm: Introduce the pwm_args concept") Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
e39c0df1be
commit
fbd45a1298
1 changed files with 17 additions and 10 deletions
Loading…
Add table
Add a link
Reference in a new issue