[PATCH] pwm: atmel: Simplify using devm functions
Thierry Reding
thierry.reding at gmail.com
Fri Jul 28 00:34:15 PDT 2023
On Wed, Jul 19, 2023 at 09:32:13PM +0200, Uwe Kleine-König wrote:
> For all resources used by the driver there is a devm variant to allocate
> these. This makes it unnecessary to implement an error path or a remove
> function.
>
> While at it also use dev_err_probe() to compact returning an error.
>
> With the remove callback gone, there is no user of driver data left, so
> the call to platform_set_drvdata() can also be dropped.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
> drivers/pwm/pwm-atmel.c | 38 ++++++++------------------------------
> 1 file changed, 8 insertions(+), 30 deletions(-)
Doesn't apply to the for-next branch, please rebase.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230728/14b16f6f/attachment.sig>
More information about the linux-arm-kernel
mailing list