822c8bb7b9
[ Upstream commit 5bb0b194aeee5d5da6881232f4e9989b35957c25 ]
Instead of of_clk_get_by_name() use devm_clk_get_prepared() which has
several advantages:
- Combines getting the clock and a call to clk_prepare(). The latter
can be dropped from sti_pwm_probe() accordingly.
- Cares for calling clk_put() which is missing in both probe's error
path and the remove function.
- Cares for calling clk_unprepare() which can be dropped from the error
paths and the remove function. (Note that not all error path got this
right.)
With additionally using devm_pwmchip_add() instead of pwmchip_add() the
remove callback can be dropped completely. With it the last user of
platform_get_drvdata() goes away and so platform_set_drvdata() can be
dropped from the probe function, too.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
core.c | ||
pwm-ab8500.c | ||
pwm-atmel-hlcdc.c | ||
pwm-atmel-tcb.c | ||
pwm-atmel.c | ||
pwm-bcm-iproc.c | ||
pwm-bcm-kona.c | ||
pwm-bcm2835.c | ||
pwm-berlin.c | ||
pwm-brcmstb.c | ||
pwm-clps711x.c | ||
pwm-crc.c | ||
pwm-cros-ec.c | ||
pwm-dwc.c | ||
pwm-ep93xx.c | ||
pwm-fsl-ftm.c | ||
pwm-hibvt.c | ||
pwm-img.c | ||
pwm-imx-tpm.c | ||
pwm-imx1.c | ||
pwm-imx27.c | ||
pwm-intel-lgm.c | ||
pwm-iqs620a.c | ||
pwm-jz4740.c | ||
pwm-keembay.c | ||
pwm-lp3943.c | ||
pwm-lpc18xx-sct.c | ||
pwm-lpc32xx.c | ||
pwm-lpss-pci.c | ||
pwm-lpss-platform.c | ||
pwm-lpss.c | ||
pwm-lpss.h | ||
pwm-mediatek.c | ||
pwm-meson.c | ||
pwm-mtk-disp.c | ||
pwm-mxs.c | ||
pwm-ntxec.c | ||
pwm-omap-dmtimer.c | ||
pwm-pca9685.c | ||
pwm-pxa.c | ||
pwm-raspberrypi-poe.c | ||
pwm-rcar.c | ||
pwm-renesas-tpu.c | ||
pwm-rockchip.c | ||
pwm-samsung.c | ||
pwm-sifive.c | ||
pwm-sl28cpld.c | ||
pwm-spear.c | ||
pwm-sprd.c | ||
pwm-sti.c | ||
pwm-stm32-lp.c | ||
pwm-stm32.c | ||
pwm-stmpe.c | ||
pwm-sun4i.c | ||
pwm-tegra.c | ||
pwm-tiecap.c | ||
pwm-tiehrpwm.c | ||
pwm-twl-led.c | ||
pwm-twl.c | ||
pwm-visconti.c | ||
pwm-vt8500.c | ||
sysfs.c |