driver core: fw_devlink: Consolidate device link flag computation
authorSaravana Kannan <saravanak@google.com>
Tue, 7 Feb 2023 01:41:59 +0000 (17:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:37 +0000 (09:33 +0100)
commit7a8ce4d2fbbcea85de9beb40ccd5dbfe1f243b01
tree56506e22ddc93bab2eaeff5818416eea1bd5f799
parent16aa2487cf15ff584165d93dba5ef0c29856b399
driver core: fw_devlink: Consolidate device link flag computation

[ Upstream commit cd115c0409f283edde94bd5a9a42dc42bee0aba8 ]

Consolidate the code that computes the flags to be used when creating a
device link from a fwnode link.

Fixes: 2de9d8e0d2fe ("driver core: fw_devlink: Improve handling of cyclic dependencies")
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcom/sm7225-fairphone-fp4
Link: https://lore.kernel.org/r/20230207014207.1678715-8-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/core.c
include/linux/fwnode.h