android_kernel_xiaomi_sm8450/drivers/pwm
Vladimir Zapolskiy a2d9d884e8 pwm: lpc32xx: Remove handling of PWM channels
[ Upstream commit 4aae44f65827f0213a7361cf9c32cfe06114473f ]

Because LPC32xx PWM controllers have only a single output which is
registered as the only PWM device/channel per controller, it is known in
advance that pwm->hwpwm value is always 0. On basis of this fact
simplify the code by removing operations with pwm->hwpwm, there is no
controls which require channel number as input.

Even though I wasn't aware at the time when I forward ported that patch,
this fixes a null pointer dereference as lpc32xx->chip.pwms is NULL
before devm_pwmchip_add() is called.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 3d2813fb17e5 ("pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered")
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:20:25 +02:00
..
core.c
Kconfig
Makefile
pwm-ab8500.c
pwm-atmel-hlcdc.c
pwm-atmel-tcb.c
pwm-atmel.c
pwm-bcm2835.c
pwm-bcm-iproc.c
pwm-bcm-kona.c
pwm-berlin.c
pwm-brcmstb.c
pwm-clps711x.c
pwm-crc.c
pwm-cros-ec.c pwm: cros-ec: Explicitly set .polarity in .get_state() 2023-04-20 12:10:21 +02:00
pwm-ep93xx.c
pwm-fsl-ftm.c
pwm-hibvt.c pwm: hibvt: Explicitly set .polarity in .get_state() 2023-04-26 11:27:42 +02:00
pwm-img.c
pwm-imx1.c
pwm-imx27.c
pwm-imx-tpm.c pwm: imx-tpm: force 'real_period' to be zero in suspend 2023-07-27 08:44:07 +02:00
pwm-iqs620a.c pwm: iqs620a: Explicitly set .polarity in .get_state() 2023-04-26 11:27:42 +02:00
pwm-jz4740.c
pwm-lp3943.c
pwm-lpc18xx-sct.c pwm: lpc18xx-sct: Convert to devm_platform_ioremap_resource() 2022-08-21 15:15:37 +02:00
pwm-lpc32xx.c pwm: lpc32xx: Remove handling of PWM channels 2023-09-19 12:20:25 +02:00
pwm-lpss-pci.c
pwm-lpss-platform.c
pwm-lpss.c
pwm-lpss.h
pwm-mediatek.c
pwm-meson.c pwm: meson: fix handling of period/duty if greater than UINT_MAX 2023-08-11 11:57:33 +02:00
pwm-mtk-disp.c pwm: mtk-disp: Disable shadow registers before setting backlight values 2023-05-17 11:48:04 +02:00
pwm-mxs.c
pwm-omap-dmtimer.c
pwm-pca9685.c
pwm-pxa.c
pwm-rcar.c
pwm-renesas-tpu.c
pwm-rockchip.c
pwm-samsung.c
pwm-sifive.c pwm: sifive: Always let the first pwm_apply_state succeed 2023-03-11 16:40:08 +01:00
pwm-sl28cpld.c
pwm-spear.c
pwm-sprd.c pwm: sprd: Explicitly set .polarity in .get_state() 2023-04-20 12:10:21 +02:00
pwm-sti.c
pwm-stm32-lp.c pwm: stm32-lp: fix the check on arr and cmp registers update 2023-03-11 16:40:08 +01:00
pwm-stm32.c
pwm-stmpe.c
pwm-sun4i.c
pwm-tegra.c pwm: tegra: Fix 32 bit build 2023-01-14 10:16:24 +01:00
pwm-tiecap.c
pwm-tiehrpwm.c
pwm-twl-led.c
pwm-twl.c
pwm-vt8500.c
pwm-zx.c
sysfs.c pwm: sysfs: Do not apply state to already disabled PWMs 2023-07-27 08:44:07 +02:00