All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Alexandru Ardelean <aardelean@deviqon.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	alexandre.torgue@foss.st.com,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>
Subject: Re: [PATCH] gpio: gpio-stmpe: fully use convert probe to device-managed
Date: Thu, 20 May 2021 01:55:00 +0200	[thread overview]
Message-ID: <CACRpkdb6Y4j0Pq5B+WaHy6akvczc-1foABFSq=uHpUg9=GL1GQ@mail.gmail.com> (raw)
In-Reply-To: <20210516061425.8757-1-aardelean@deviqon.com>

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

  reply	other threads:[~2021-05-19 23:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16  6:14 [PATCH] gpio: gpio-stmpe: fully use convert probe to device-managed Alexandru Ardelean
2021-05-19 23:55 ` Linus Walleij [this message]
     [not found] ` <CAHp75VcesNFXCMoWbdBR2mFCt89p8aycWbheMhv9DnU8TBqNSA@mail.gmail.com>
2021-05-20 10:06   ` Alexandru Ardelean
2021-05-21 12:42 ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACRpkdb6Y4j0Pq5B+WaHy6akvczc-1foABFSq=uHpUg9=GL1GQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=aardelean@deviqon.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.