mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Bluetooth: Change to use DEFINE_SHOW_ATTRIBUTE macro
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
f79ba43002
commit
8e2924e383
4 changed files with 4 additions and 44 deletions
|
|
@ -7650,17 +7650,7 @@ static int l2cap_debugfs_show(struct seq_file *f, void *p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l2cap_debugfs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, l2cap_debugfs_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations l2cap_debugfs_fops = {
|
||||
.open = l2cap_debugfs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(l2cap_debugfs);
|
||||
|
||||
static struct dentry *l2cap_debugfs;
|
||||
|
||||
|
|
|
|||
|
|
@ -2166,17 +2166,7 @@ static int rfcomm_dlc_debugfs_show(struct seq_file *f, void *x)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int rfcomm_dlc_debugfs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, rfcomm_dlc_debugfs_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations rfcomm_dlc_debugfs_fops = {
|
||||
.open = rfcomm_dlc_debugfs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(rfcomm_dlc_debugfs);
|
||||
|
||||
static struct dentry *rfcomm_dlc_debugfs;
|
||||
|
||||
|
|
|
|||
|
|
@ -1020,17 +1020,7 @@ static int rfcomm_sock_debugfs_show(struct seq_file *f, void *p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int rfcomm_sock_debugfs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, rfcomm_sock_debugfs_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations rfcomm_sock_debugfs_fops = {
|
||||
.open = rfcomm_sock_debugfs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(rfcomm_sock_debugfs);
|
||||
|
||||
static struct dentry *rfcomm_sock_debugfs;
|
||||
|
||||
|
|
|
|||
|
|
@ -1173,17 +1173,7 @@ static int sco_debugfs_show(struct seq_file *f, void *p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sco_debugfs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, sco_debugfs_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations sco_debugfs_fops = {
|
||||
.open = sco_debugfs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(sco_debugfs);
|
||||
|
||||
static struct dentry *sco_debugfs;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue