Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1553422 > unrolled thread

[PATCH 4.8 75/96] Input: drv260x - fix input devices parent assignment

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-01-07 00:00 +0100
Last post2017-01-07 00:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.8 75/96] Input: drv260x - fix input devices parent assignment Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-07 00:00 +0100

#1553422 — [PATCH 4.8 75/96] Input: drv260x - fix input devices parent assignment

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-01-07 00:00 +0100
Subject[PATCH 4.8 75/96] Input: drv260x - fix input devices parent assignment
Message-ID<sWLEl-9g-7@gated-at.bofh.it>
4.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jingkui Wang <jkwang@google.com>

commit 5a8a6b89c15766446d845671d574a9243b6d8786 upstream.

We were assigning I2C bus controller instead of client as parent device.
Besides being logically wrong, it messed up with devm handling of input
device. As a result we were leaving input device and event node behind
after rmmod-ing the driver, which lead to a kernel oops if one were to
access the event node later.

Let's remove the assignment and rely on devm_input_allocate_device() to
set it up properly for us.

Signed-off-by: Jingkui Wang <jkwang@google.com>
Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/misc/drv260x.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -592,7 +592,6 @@ static int drv260x_probe(struct i2c_clie
 	}
 
 	haptics->input_dev->name = "drv260x:haptics";
-	haptics->input_dev->dev.parent = client->dev.parent;
 	haptics->input_dev->close = drv260x_close;
 	input_set_drvdata(haptics->input_dev, haptics);
 	input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web