]> git.baikalelectronics.ru Git - kernel.git/commit
Input: drv260x - fix input device's parent assignment
authorJingkui Wang <jkwang@google.com>
Mon, 12 Dec 2016 21:51:46 +0000 (13:51 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 12 Dec 2016 22:20:30 +0000 (14:20 -0800)
commit8247976aecc619450470ec3473524e71b2ec4fcb
tree0c8c2f123e41b0a73db3f649d7e9bf124574a65f
parent8221d45c5a6dd93f7d063aac286ec65d24baf81a
Input: drv260x - fix input device's parent assignment

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: d9ea34ee5efc ("Input: drv260x - add TI drv260x haptics driver")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/drv260x.c