drivers: base: Reduce device link removal code duplication
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 14 May 2021 12:11:19 +0000 (14:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 May 2021 20:12:14 +0000 (22:12 +0200)
commit0c8713153fbf7ba4e45172e139d501c86006dc03
tree032ce94f721d64368749cf915014652eac66fc4b
parent80dd33cf72d1ab4f0af303f1fa242c6d6c8d328f
drivers: base: Reduce device link removal code duplication

Reduce device link removal code duplication between the cases when
SRCU is enabled and when it is disabled by moving the only differing
piece of it (which is the removal of the link from the consumer and
supplier lists) into a separate wrapper function (defined differently
for each of the cases in question).

No intentional functional impact.

Reviewed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/4326215.LvFx2qVVIh@kreacher
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c