]> git.baikalelectronics.ru Git - kernel.git/commit
mei: set device client to the disconnected state upon suspend.
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 14 Feb 2018 12:03:29 +0000 (14:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 10:16:40 +0000 (11:16 +0100)
commita4117d59db1502f28a732daff0d88da01b8478e2
treeda52ccdb36fe46a16520357d6880d0adcab3e684
parent97f4a6d3c9d4103600e2f1500f807e7e3bbaeadc
mei: set device client to the disconnected state upon suspend.

This fixes regression introduced by
commit 42bb9c5bd2e7 ("mei: speed up the power down flow")

In mei_cldev_disable during device power down flow, such as
suspend or system power off, it jumps over disconnecting function
to speed up the power down process, however, because the client is
unlinked from the file_list (mei_cl_unlink) mei_cl_set_disconnected
is not called from mei_cl_all_disconnect leaving resource leaking.
The most visible is reference counter on underlying HW module is
not decreased preventing to remove modules after suspend/resume cycles.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Fixes: 42bb9c5bd2e7 ("mei: speed up the power down flow")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/bus.c
drivers/misc/mei/client.c