Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_firmware.c Create Date:2022-07-28 06:28:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:trigger_custom_fallback_store

Proto:static ssize_t trigger_custom_fallback_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)

Type:ssize_t

Parameter:

TypeParameterName
struct device *dev
struct device_attribute *attr
const char *buf
size_tcount
568  name = kstrndup(buf, count, GFP_KERNEL)
569  If Not name Then Return -ENOSPC
572  pr_info("loading '%s' using custom fallback mechanism\n", name)
574  mutex_lock( & test_fw_mutex)
575  release_firmware(test_firmware)
576  test_firmware = NULL
577  rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, name, dev, GFP_KERNEL, NULL, trigger_async_request_cb)
580  If rc Then
581  pr_info("async load of '%s' failed: %d\n", name, rc)
582  kfree(name)
583  Go to out
586  kfree(name)
588  wait_for_completion( & async_fw_done)
590  If test_firmware Then
591  pr_info("loaded: %zu\n", size)
592  rc = count
593  Else
594  pr_err("failed to async load firmware\n")
595  rc = -ENODEV
598  out :
599  mutex_unlock( & test_fw_mutex)
601  Return rc