]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
driver core: Call sync_state() even if supplier has no consumers
authorSaravana Kannan <saravanak@google.com>
Fri, 21 Feb 2020 08:05:08 +0000 (00:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:30 +0000 (07:18 +0100)
commit8d6462645e11d0497dc5aa974b6e5645ced54432
tree0d7e0d0ce5312eaa311dfc43ac7eea21bfe8982c
parent60aa8a21fcce9e9dbf63df8e4bb7b5a533018130
driver core: Call sync_state() even if supplier has no consumers

commit 21eb93f432b1a785df193df1a56a59e9eb3a985f upstream.

The initial patch that added sync_state() support didn't handle the case
where a supplier has no consumers. This was because when a device is
successfully bound with a driver, only its suppliers were checked to see
if they are eligible to get a sync_state(). This is not sufficient for
devices that have no consumers but still need to do device state clean
up. So fix this.

Fixes: fc5a251d0fd7ca90 (driver core: Add sync_state driver/bus callback)
Signed-off-by: Saravana Kannan <saravanak@google.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200221080510.197337-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c