lkml.org 
[lkml]   [2016]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v5 3/5] firmware: rename fw_load_from_user_helper() and _request_firmware_load()
Date
From: Daniel Wagner <daniel.wagner@bmw-carit.de>

fw_load_from_user_helper() and _request_firmware_load() are used when
CONFIG_FW_LOADER_USER_HELPER is enabled. In order to clearly mark which
part of the code is depending on UMH we stream line these functions to
match with the rest of the code, e.g. fw_umh_done().

Suggested by Luis.

Cc: Ming Lei <ming.lei@canonical.com>
Cc: Luis R. Rodriguez <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
drivers/base/firmware_class.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 821babe..5e38c27 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -979,9 +979,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
return fw_priv;
}

-/* load a firmware via user helper */
-static int _request_firmware_load(struct firmware_priv *fw_priv,
- unsigned int opt_flags, long timeout)
+static int _request_firmware_umh(struct firmware_priv *fw_priv,
+ unsigned int opt_flags, long timeout)
{
int retval = 0;
struct device *f_dev = &fw_priv->dev;
@@ -1032,9 +1031,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
return retval;
}

-static int fw_load_from_user_helper(struct firmware *firmware,
- const char *name, struct device *device,
- unsigned int opt_flags, long timeout)
+static int fw_get_umh_firmware(struct firmware *firmware, const char *name,
+ struct device *device, unsigned int opt_flags,
+ long timeout)
{
struct firmware_priv *fw_priv;

@@ -1043,7 +1042,7 @@ static int fw_load_from_user_helper(struct firmware *firmware,
return PTR_ERR(fw_priv);

fw_priv->buf = firmware->priv;
- return _request_firmware_load(fw_priv, opt_flags, timeout);
+ return _request_firmware_umh(fw_priv, opt_flags, timeout);
}

#ifdef CONFIG_PM_SLEEP
@@ -1064,9 +1063,9 @@ static void kill_requests_without_uevent(void)

#else /* CONFIG_FW_LOADER_USER_HELPER */
static inline int
-fw_load_from_user_helper(struct firmware *firmware, const char *name,
- struct device *device, unsigned int opt_flags,
- long timeout)
+fw_get_umh_firmware(struct firmware *firmware, const char *name,
+ struct device *device, unsigned int opt_flags,
+ long timeout)
{
return -ENOENT;
}
@@ -1242,8 +1241,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
name, ret);
if (opt_flags & FW_OPT_USERHELPER) {
dev_warn(device, "Falling back to user helper\n");
- ret = fw_load_from_user_helper(fw, name, device,
- opt_flags, timeout);
+ ret = fw_get_umh_firmware(fw, name, device,
+ opt_flags, timeout);
}
}

--
2.7.4
\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.113 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site