driver core: Remove the link if there is no driver with AUTO flag
authorYong Wu <yong.wu@mediatek.com>
Tue, 1 Jan 2019 04:51:05 +0000 (12:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 13:25:26 +0000 (14:25 +0100)
commitc36f4367d56d9ad08d2806396b1eb922204ba4aa
tree7e45a7113487214b2f63efcf39db81ded7d10e54
parent91b64ec852e57cf250c7815ad59ef7e40ae725e7
driver core: Remove the link if there is no driver with AUTO flag

DL_FLAG_AUTOREMOVE_CONSUMER/SUPPLIER means "Remove the link
automatically on consumer/supplier driver unbind", that means we should
remove whole the device_link when there is no this driver no matter what
the ref_count of the link is.

CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c