All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "Input: synaptics-rmi4 - do not delete interrupt memory too early" has been added to the 4.15-stable tree
@ 2018-02-02 10:43 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-02 10:43 UTC (permalink / raw)
  To: dmitry.torokhov, gregkh, lyude; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    Input: synaptics-rmi4 - do not delete interrupt memory too early

to the 4.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-synaptics-rmi4-do-not-delete-interrupt-memory-too-early.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From a1ab69021a584d952e6548a44b93760547b1b6b5 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Wed, 17 Jan 2018 16:18:27 -0800
Subject: Input: synaptics-rmi4 - do not delete interrupt memory too early

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

commit a1ab69021a584d952e6548a44b93760547b1b6b5 upstream.

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.

Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/rmi4/rmi_driver.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- 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_d
 
 	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_d
 
 	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)


Patches currently in stable-queue which might be from dmitry.torokhov@gmail.com are

queue-4.15/input-synaptics-rmi4-do-not-delete-interrupt-memory-too-early.patch
queue-4.15/input-synaptics-rmi4-unmask-f03-interrupts-when-port-is-opened.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-02 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-02 10:43 Patch "Input: synaptics-rmi4 - do not delete interrupt memory too early" has been added to the 4.15-stable tree gregkh

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.