Loading drivers/base/firmware_loader/main.c +18 −12 Original line number Diff line number Diff line Loading @@ -210,11 +210,12 @@ static struct fw_priv *__lookup_fw_priv(const char *fw_name) static int alloc_lookup_fw_priv(const char *fw_name, struct firmware_cache *fwc, struct fw_priv **fw_priv, void *dbuf, size_t size) size_t size, enum fw_opt opt_flags) { struct fw_priv *tmp; spin_lock(&fwc->lock); if (!(opt_flags & FW_OPT_NOCACHE)) { tmp = __lookup_fw_priv(fw_name); if (tmp) { kref_get(&tmp->ref); Loading @@ -223,8 +224,10 @@ static int alloc_lookup_fw_priv(const char *fw_name, pr_debug("batched request - sharing the same struct fw_priv and lookup for multiple requests\n"); return 1; } } tmp = __allocate_fw_priv(fw_name, fwc, dbuf, size); if (tmp) if (tmp && !(opt_flags & FW_OPT_NOCACHE)) list_add(&tmp->list, &fwc->head); spin_unlock(&fwc->lock); Loading Loading @@ -500,7 +503,8 @@ int assign_fw(struct firmware *fw, struct device *device, */ static int _request_firmware_prepare(struct firmware **firmware_p, const char *name, struct device *device, void *dbuf, size_t size) struct device *device, void *dbuf, size_t size, enum fw_opt opt_flags) { struct firmware *firmware; struct fw_priv *fw_priv; Loading @@ -518,7 +522,8 @@ _request_firmware_prepare(struct firmware **firmware_p, const char *name, return 0; /* assigned */ } ret = alloc_lookup_fw_priv(name, &fw_cache, &fw_priv, dbuf, size); ret = alloc_lookup_fw_priv(name, &fw_cache, &fw_priv, dbuf, size, opt_flags); /* * bind with 'priv' now to avoid warning in failure path Loading Loading @@ -578,7 +583,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name, goto out; } ret = _request_firmware_prepare(&fw, name, device, buf, size); ret = _request_firmware_prepare(&fw, name, device, buf, size, opt_flags); if (ret <= 0) /* error or already assigned */ goto out; Loading Loading
drivers/base/firmware_loader/main.c +18 −12 Original line number Diff line number Diff line Loading @@ -210,11 +210,12 @@ static struct fw_priv *__lookup_fw_priv(const char *fw_name) static int alloc_lookup_fw_priv(const char *fw_name, struct firmware_cache *fwc, struct fw_priv **fw_priv, void *dbuf, size_t size) size_t size, enum fw_opt opt_flags) { struct fw_priv *tmp; spin_lock(&fwc->lock); if (!(opt_flags & FW_OPT_NOCACHE)) { tmp = __lookup_fw_priv(fw_name); if (tmp) { kref_get(&tmp->ref); Loading @@ -223,8 +224,10 @@ static int alloc_lookup_fw_priv(const char *fw_name, pr_debug("batched request - sharing the same struct fw_priv and lookup for multiple requests\n"); return 1; } } tmp = __allocate_fw_priv(fw_name, fwc, dbuf, size); if (tmp) if (tmp && !(opt_flags & FW_OPT_NOCACHE)) list_add(&tmp->list, &fwc->head); spin_unlock(&fwc->lock); Loading Loading @@ -500,7 +503,8 @@ int assign_fw(struct firmware *fw, struct device *device, */ static int _request_firmware_prepare(struct firmware **firmware_p, const char *name, struct device *device, void *dbuf, size_t size) struct device *device, void *dbuf, size_t size, enum fw_opt opt_flags) { struct firmware *firmware; struct fw_priv *fw_priv; Loading @@ -518,7 +522,8 @@ _request_firmware_prepare(struct firmware **firmware_p, const char *name, return 0; /* assigned */ } ret = alloc_lookup_fw_priv(name, &fw_cache, &fw_priv, dbuf, size); ret = alloc_lookup_fw_priv(name, &fw_cache, &fw_priv, dbuf, size, opt_flags); /* * bind with 'priv' now to avoid warning in failure path Loading Loading @@ -578,7 +583,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name, goto out; } ret = _request_firmware_prepare(&fw, name, device, buf, size); ret = _request_firmware_prepare(&fw, name, device, buf, size, opt_flags); if (ret <= 0) /* error or already assigned */ goto out; Loading