Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:trigger_async_request_store

Proto:static ssize_t trigger_async_request_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
525  name = kstrndup(buf, count, GFP_KERNEL)
526  If Not name Then Return -ENOSPC
529  pr_info("loading '%s'\n", name)
531  mutex_lock( & test_fw_mutex)
532  release_firmware(test_firmware)
533  test_firmware = NULL
534  rc = request_firmware_nowait(THIS_MODULE, 1, name, dev, GFP_KERNEL, NULL, trigger_async_request_cb)
536  If rc Then
537  pr_info("async load of '%s' failed: %d\n", name, rc)
538  kfree(name)
539  Go to out
542  kfree(name)
544  wait_for_completion( & async_fw_done)
546  If test_firmware Then
547  pr_info("loaded: %zu\n", size)
548  rc = count
549  Else
550  pr_err("failed to async load firmware\n")
551  rc = -ENOMEM
554  out :
555  mutex_unlock( & test_fw_mutex)
557  Return rc