From: thatslyude@gmail.com
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Damjan Georgievski <gdamjan@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Duggan <aduggan@synaptics.com>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/3] Input: synaptics_rmi4 - do not delete interrupt memory too early
Date: Thu, 18 Jan 2018 20:05:51 -0500 [thread overview]
Message-ID: <1516323951.2814.2.camel@gmail.com> (raw)
In-Reply-To: <20180119004955.247190-2-dmitry.torokhov@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
(hope you don't mind that I'm using my gmail address for this ;)
On Thu, 2018-01-18 at 16:49 -0800, Dmitry Torokhov wrote:
> We want to free memory reserved for interrupt mask handling only after we
> free functions, as function drivers might want to mask interrupts. This is
> needed for the followup patch to the F03 that would implement unmasking and
> masking interrupts from the serio pass-through port open() and close()
> methods.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/input/rmi4/rmi_driver.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_driver.c
> b/drivers/input/rmi4/rmi_driver.c
> index 27791d6546c66..ce3ede289ed04 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -41,6 +41,13 @@ void rmi_free_function_list(struct rmi_device *rmi_dev)
>
> rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, "Freeing function list\n");
>
> + /* Doing it in the reverse order so F01 will be removed last */
> + list_for_each_entry_safe_reverse(fn, tmp,
> + &data->function_list, node) {
> + list_del(&fn->node);
> + rmi_unregister_function(fn);
> + }
> +
> devm_kfree(&rmi_dev->dev, data->irq_memory);
> data->irq_memory = NULL;
> data->irq_status = NULL;
> @@ -50,13 +57,6 @@ void rmi_free_function_list(struct rmi_device *rmi_dev)
>
> data->f01_container = NULL;
> data->f34_container = NULL;
> -
> - /* Doing it in the reverse order so F01 will be removed last */
> - list_for_each_entry_safe_reverse(fn, tmp,
> - &data->function_list, node) {
> - list_del(&fn->node);
> - rmi_unregister_function(fn);
> - }
> }
>
> static int reset_one_function(struct rmi_function *fn)
next prev parent reply other threads:[~2018-01-19 1:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180119004955.247190-1-dmitry.torokhov@gmail.com>
2018-01-19 0:49 ` [PATCH 1/3] Input: synaptics_rmi4 - do not delete interrupt memory too early Dmitry Torokhov
2018-01-19 1:05 ` thatslyude [this message]
2018-01-19 0:49 ` [PATCH 2/3] Input: synaptics_rmi4 - unmask F03 interrupts when port is opened Dmitry Torokhov
2018-01-19 18:08 ` thatslyude
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=1516323951.2814.2.camel@gmail.com \
--to=thatslyude@gmail.com \
--cc=aduggan@synaptics.com \
--cc=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gdamjan@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).