lkml.org 
[lkml]   [2021]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: gpio-stmpe: fully use convert probe to device-managed
On Sun, May 16, 2021 at 8:14 AM Alexandru Ardelean
<aardelean@deviqon.com> wrote:

> The driver doesn't look like it can be built as a kmod, so leaks cannot
> happen via a rmmod mechanism.
> The remove hook was removed via commit 3b52bb960ec6 ("gpio: stmpe: make
> it explicitly non-modular").
>
> The IRQ is registered via devm_request_threaded_irq(), making the driver
> only partially device-managed.
>
> In any case all resources should be made device-managed, mostly as a good
> practice. That way at least the unwinding on error is happening in reverse
> order (as the probe).
>
> This change also removes platform_set_drvdata() since the information is
> never retrieved to be used in the driver.
>
> Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>

Nice!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2021-05-20 01:56    [W:0.073 / U:2.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site