ANDROID: firmware_loader: Fix warning with firmware_param_path_set
Compile time warning is observed with firmware_param_path_set()
for using the __setup() macro when firmware_loader enabled as module.
drivers/base/firmware_loader/main.c:428:19: warning: 'firmware_param_path_set'
defined but not used [-Wunused-function]
Fix the above warning by using the module_param_cb instead of __setup for
firmware_class.path commandline.
Bug: 202192667
Fixes: d551647f3b ("ANDROID: firmware_loader: Add support for customer firmware paths")
Change-Id: I73cdee9815e84a507ac886e6e181d4a489fd2e5f
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
This commit is contained in:
@@ -485,7 +485,7 @@ static const char * const fw_path[] = {
|
||||
};
|
||||
|
||||
static char strpath[PATH_SIZE * CUSTOM_FW_PATH_COUNT];
|
||||
static int __init firmware_param_path_set(char *val)
|
||||
static int firmware_param_path_set(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int i;
|
||||
char *path, *end;
|
||||
@@ -515,7 +515,7 @@ static int __init firmware_param_path_set(char *val)
|
||||
path = ++end;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -524,7 +524,12 @@ static int __init firmware_param_path_set(char *val)
|
||||
* kernel instead of module. ',' is used as delimiter for setting 10
|
||||
* custom paths for firmware loader.
|
||||
*/
|
||||
__setup("firmware_class.path=", firmware_param_path_set);
|
||||
|
||||
static const struct kernel_param_ops firmware_param_ops = {
|
||||
.set = firmware_param_path_set,
|
||||
};
|
||||
module_param_cb(path, &firmware_param_ops, NULL, 0200);
|
||||
MODULE_PARM_DESC(path, "customized firmware image search path with a higher priority than default path");
|
||||
|
||||
static int
|
||||
fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv,
|
||||
|
||||
Reference in New Issue
Block a user