[PATCH] Input: Driver drv260x.c - fix bug of adding wrong device parent

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE3562d

2 messages, 2 authors, 2016-12-12 · open the first message on its own page

[PATCH] Input: Driver drv260x.c - fix bug of adding wrong device parent

From: Jingkui Wang <hidden>
Date: 2016-12-12 21:37:29

Fix the bug of adding wrong parent to the input_dev created by the
driver. The bug will be triggered if rmmod is called for this driver
module.

Signed-off-by: Jingkui Wang <redacted>
---
 drivers/input/misc/drv260x.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index 4f448ba..885c140 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -565,7 +565,6 @@ static int drv260x_probe(struct i2c_client *client,
 	}
 
 	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);
-- 
2.6.6

Re: [PATCH] Input: Driver drv260x.c - fix bug of adding wrong device parent

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2016-12-12 22:05:04

On Mon, Dec 12, 2016 at 01:37:07PM -0800, Jingkui Wang wrote:
Fix the bug of adding wrong parent to the input_dev created by the
driver. The bug will be triggered if rmmod is called for this driver
module.

Signed-off-by: Jingkui Wang <redacted>
Applied and marked for stable, thank you.
quoted hunk
---
 drivers/input/misc/drv260x.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index 4f448ba..885c140 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -565,7 +565,6 @@ static int drv260x_probe(struct i2c_client *client,
 	}
 
 	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);
-- 
2.6.6
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help