mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacmn: Replace request_firmware by firmware_request_nowarn
Replace request_firmware by firmware_request_nowarn to avoid warning message when the file is not found and sysfs fallback mechanism is enabled if direct filesystem lookup fails. Change-Id: Ib55d257aa01c52523b1f1137165c842e139ce614 CRs-Fixed: 2912039
This commit is contained in:
parent
8dcedb26a2
commit
f79c724f8b
1 changed files with 21 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -24,6 +24,25 @@
|
|||
#include "qdf_trace.h"
|
||||
#include "qdf_types.h"
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0))
|
||||
static inline
|
||||
int qdf_firmware_request_nowarn(const struct firmware **fw,
|
||||
const char *name,
|
||||
struct device *device)
|
||||
{
|
||||
return firmware_request_nowarn(fw, name, device);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
int qdf_firmware_request_nowarn(const struct firmware **fw,
|
||||
const char *name,
|
||||
struct device *device)
|
||||
{
|
||||
return request_firmware(fw, name, device);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
QDF_STATUS qdf_file_read(const char *path, char **out_buf)
|
||||
{
|
||||
int errno;
|
||||
|
|
@ -32,7 +51,7 @@ QDF_STATUS qdf_file_read(const char *path, char **out_buf)
|
|||
|
||||
*out_buf = NULL;
|
||||
|
||||
errno = request_firmware(&fw, path, NULL);
|
||||
errno = qdf_firmware_request_nowarn(&fw, path, NULL);
|
||||
if (errno) {
|
||||
qdf_err("Failed to read file %s", path);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue