From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: spear-keyboard - Simplify resource management
Date: Mon, 31 Jan 2022 08:15:17 -0800 [thread overview]
Message-ID: <YfgLFXZkbsIFJzP6@google.com> (raw)
In-Reply-To: <c4b6e8b122259198ce76f42bf786b75cfd0cbffc.1643530826.git.christophe.jaillet@wanadoo.fr>
On Sun, Jan 30, 2022 at 09:20:44AM +0100, Christophe JAILLET wrote:
> Since the commit in the Fixes tag below, 'kbd->input' is a managed resource
> that doesn't need to be explicitly unregistered or freed (see
> devm_input_allocate_device() documentation)
>
> So, remove a unless line of code to slightly simplify it.
>
> Fixes: 6102752eb354 ("Input: spear-keyboard - switch to using managed resources")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only
> ---
> drivers/input/keyboard/spear-keyboard.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
> index 9838c79cb288..c36836159fb3 100644
> --- a/drivers/input/keyboard/spear-keyboard.c
> +++ b/drivers/input/keyboard/spear-keyboard.c
> @@ -278,7 +278,6 @@ static int spear_kbd_remove(struct platform_device *pdev)
> {
> struct spear_kbd *kbd = platform_get_drvdata(pdev);
>
> - input_unregister_device(kbd->input);
> clk_unprepare(kbd->clk);
This is wrong for the same reason as the other patch: it changes the
order of operations.
>
> return 0;
> --
> 2.32.0
>
Thanks.
--
Dmitry
prev parent reply other threads:[~2022-01-31 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-30 8:20 [PATCH] Input: spear-keyboard - Simplify resource management Christophe JAILLET
2022-01-31 16:15 ` Dmitry Torokhov [this message]
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=YfgLFXZkbsIFJzP6@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox