mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
firmware: add nowarn variant of request_firmware_nowait()
Device drivers with optional firmware may still want to use the asynchronous firmware loading interface. To avoid printing a warning into the kernel log when the optional firmware is absent, add a nowarn variant of this interface. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Link: https://lore.kernel.org/r/20240516102532.213874-1-l.stach@pengutronix.de Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
@@ -98,6 +98,10 @@ static inline bool firmware_request_builtin(struct firmware *fw,
|
||||
#if IS_REACHABLE(CONFIG_FW_LOADER)
|
||||
int request_firmware(const struct firmware **fw, const char *name,
|
||||
struct device *device);
|
||||
int firmware_request_nowait_nowarn(
|
||||
struct module *module, const char *name,
|
||||
struct device *device, gfp_t gfp, void *context,
|
||||
void (*cont)(const struct firmware *fw, void *context));
|
||||
int firmware_request_nowarn(const struct firmware **fw, const char *name,
|
||||
struct device *device);
|
||||
int firmware_request_platform(const struct firmware **fw, const char *name,
|
||||
@@ -123,6 +127,14 @@ static inline int request_firmware(const struct firmware **fw,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int firmware_request_nowait_nowarn(
|
||||
struct module *module, const char *name,
|
||||
struct device *device, gfp_t gfp, void *context,
|
||||
void (*cont)(const struct firmware *fw, void *context))
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int firmware_request_nowarn(const struct firmware **fw,
|
||||
const char *name,
|
||||
struct device *device)
|
||||
|
||||
Reference in New Issue
Block a user