firmware: provide helper for FW_OPT_USERHELPER
authorLuis R. Rodriguez <mcgrof@kernel.org>
Mon, 20 Nov 2017 18:23:57 +0000 (10:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Nov 2017 10:18:43 +0000 (11:18 +0100)
commit25d3913181b3e397549cb6584d7ab1a37709d104
tree5912222a1d3464c744873a66f6642c8d7f4083ff
parent5711ae6d3054e13a95858da6df6d142bec90d832
firmware: provide helper for FW_OPT_USERHELPER

The macro FW_OPT_USERHELPER is only currently defined when
CONFIG_FW_LOADER_USER_HELPER is set. This is handled via an
ifdef around CONFIG_FW_LOADER_USER_HELPER. This makes reading
and understanding use FW_OPT_USERHELPER a bit convoluted.

Instead wrap the functionality implemented behind
CONFIG_FW_LOADER_USER_HELPER as we typically do in the
kernel.

Now when CONFIG_FW_LOADER_USER_HELPER is *not set*, then
simply the helper fw_sysfs_fallback() will not do anything.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c