Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bsg.c Create Date:2022-07-28 17:37:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bsg_get_device

Proto:static struct bsg_device *bsg_get_device(struct inode *inode, struct file *file)

Type:struct bsg_device

Parameter:

TypeParameterName
struct inode *inode
struct file *file
289  mutex_lock( & bsg_mutex)
290  bcd = dr_find() - Return pointer for given ID
292  If Not bcd Then
293  bd = ERR_PTR( - ENODEV)
294  Go to out_unlock
297  bd = __bsg_get_device(iminor(inode), queue)
298  If Not bd Then bd = bsg_add_device(inode, queue, file)
301  out_unlock :
302  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
303  Return bd
Caller
NameDescribe
bsg_open