Re: [PATCH] pwm: atmel: Simplify using devm functions

From
Thierry Reding <hidden>
Date
2023-07-28 07:34:48
Also in
linux-pwm
Reply to
Uwe Kleine-König, 2023-07-19
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 <redacted>
---
 drivers/pwm/pwm-atmel.c | 38 ++++++++------------------------------
 1 file changed, 8 insertions(+), 30 deletions(-)
Doesn't apply to the for-next branch, please rebase.

Thierry
Thread (2 messages) 2 messages, 2 authors, last reply 2023-07-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help