From: Sebastian Reichel <sre@kernel.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org,
Arthur Demchenkov <spinal.by@gmail.com>,
Carl Philipp Klemm <philipp@uvos.xyz>,
Merlijn Wajer <merlijn@wizzup.org>, Pavel Machek <pavel@ucw.cz>,
ruleh <ruleh@gmx.de>
Subject: Re: [PATCH 4/4] Input: omap4-keypad - simplify probe with devm
Date: Wed, 6 Jan 2021 14:43:36 +0100 [thread overview]
Message-ID: <20210106134336.lmbaywvn7aqohsj5@earth.universe> (raw)
In-Reply-To: <20210106125822.31315-5-tony@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
Hi Tony,
On Wed, Jan 06, 2021 at 02:58:22PM +0200, Tony Lindgren wrote:
> Simplify probe with devm.
[...]
> /* input device allocation */
> - keypad_data->input = input_dev = input_allocate_device();
> + keypad_data->input = input_dev = devm_input_allocate_device(&pdev->dev);
> if (!input_dev) {
> error = -ENOMEM;
> goto err_pm_disable;
[...]
> static int omap4_keypad_remove(struct platform_device *pdev)
> {
> struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
> - struct resource *res;
>
> dev_pm_clear_wake_irq(&pdev->dev);
> -
> - free_irq(keypad_data->irq, keypad_data);
> -
> pm_runtime_dont_use_autosuspend(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> -
> input_unregister_device(keypad_data->input);
not needed:
* devm_input_allocate_device - allocate managed input device
* @dev: device owning the input device being created
*
* Returns prepared struct input_dev or %NULL.
*
* Managed input devices do not need to be explicitly unregistered or
* freed as it will be done automatically when owner device unbinds from
* its driver (or binding fails). [...]
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-01-06 13:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 12:58 [PATCHv4 0/4] Lost key-up interrupt handling for omap4-keypad Tony Lindgren
2021-01-06 12:58 ` [PATCH 1/4] Input: omap4-keypad - disable unused long interrupts Tony Lindgren
2021-01-06 12:58 ` [PATCH 2/4] Input: omap4-keypad - scan keys in two phases and simplify with bitmask Tony Lindgren
2021-01-06 15:01 ` kernel test robot
2021-01-06 12:58 ` [PATCH 3/4] Input: omap4-keypad - use PM runtime to check keys for errata Tony Lindgren
2021-01-06 15:33 ` kernel test robot
2021-01-06 16:15 ` kernel test robot
2021-01-06 16:22 ` kernel test robot
2021-01-10 6:34 ` Dmitry Torokhov
2021-01-10 16:49 ` Tony Lindgren
2021-01-06 12:58 ` [PATCH 4/4] Input: omap4-keypad - simplify probe with devm Tony Lindgren
2021-01-06 13:43 ` Sebastian Reichel [this message]
2021-01-08 7:25 ` Tony Lindgren
2021-01-06 17:59 ` kernel test robot
2021-01-10 6:31 ` Dmitry Torokhov
2021-01-10 16:36 ` Tony Lindgren
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=20210106134336.lmbaywvn7aqohsj5@earth.universe \
--to=sre@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=pavel@ucw.cz \
--cc=philipp@uvos.xyz \
--cc=ruleh@gmx.de \
--cc=spinal.by@gmail.com \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).