summaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4/rmi_driver.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-01 00:37:30 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-01 00:37:30 -0800
commitd67ad78e09cbb9935c74a40b85c5abe5b9cd48f8 (patch)
tree56e92b487de80090a998ff3c0469375982156802 /drivers/input/rmi4/rmi_driver.c
parent060403f34008af90e310d7e0e7531ebb3acf9557 (diff)
parentfafef982c7353e8982b951e40573e990ccf0ed00 (diff)
downloadlinux-d67ad78e09cbb9935c74a40b85c5abe5b9cd48f8.tar.bz2
Merge branch 'next' into for-linus
Prepare input updates for 4.16 merge window.
Diffstat (limited to 'drivers/input/rmi4/rmi_driver.c')
-rw-r--r--drivers/input/rmi4/rmi_driver.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 141ea228aac6..f5954981e9ee 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)