pwm: imx1: Make use of devm_pwmchip_alloc() function
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 14 Feb 2024 09:31:34 +0000 (10:31 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 19 Feb 2024 10:04:09 +0000 (11:04 +0100)
commit5911fc37c784e917276c3d6640c604e920eaf78c
tree5dc8592fc9044aee9c3b4b3ee1c0e7d5ad39aff8
parent12ca0c331a5f4d2f412c02f7a5a498e58f8b225f
pwm: imx1: Make use of devm_pwmchip_alloc() function

This prepares the pwm-imx1 driver to further changes of the pwm core
outlined in the commit introducing devm_pwmchip_alloc(). There is no
intended semantical change and the driver should behave as before.

Also convert the to_pwm_imx1_chip() helper macro to a static inline to
get some type safety.

Link: https://lore.kernel.org/r/c6995e0d281255a7514edf9f25a561302dcaf65f.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/pwm/pwm-imx1.c