driver core: Refactor sysfs and drv/bus remove hooks
authorRob Herring <robh@kernel.org>
Wed, 23 Feb 2022 22:52:57 +0000 (16:52 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Mar 2022 13:27:26 +0000 (14:27 +0100)
commit4b775aaf1ea9997f5eb1a792f357a7b81a1fc632
treec4e4d79c12e56796106708de7fa623968142377f
parent9ad307213fa4081f4bc2f2daa31d4f2d35d7a213
driver core: Refactor sysfs and drv/bus remove hooks

There are 3 copies of the same device sysfs cleanup and drv/bus remove()
hooks used for probe failure, testing re-probing, and device unbinding.

Let's refactor the code to its own function.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220223225257.1681968-3-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/dd.c