diff options
author | Jingkui Wang <jkwang@google.com> | 2016-12-12 13:51:46 -0800 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-01-12 20:56:57 -0500 |
commit | a62e45871b7b8e69a6fe62a0d2b812bb1156658a (patch) | |
tree | 60e2672b5c95345ca06c5eb7f7dd168890114d91 /drivers | |
parent | e1589b27ffb95ef8286dee5c2a2e4f7ab97763cd (diff) |
Input: drv260x - fix input device's parent assignment
[ Upstream commit 5a8a6b89c15766446d845671d574a9243b6d8786 ]
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")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/misc/drv260x.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c index 599578042ea0..009f75d25268 100644 --- a/drivers/input/misc/drv260x.c +++ b/drivers/input/misc/drv260x.c @@ -597,7 +597,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); |