mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
scsi: snic: Convert to use DEFINE_SEQ_ATTRIBUTE macro
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Link: https://lore.kernel.org/r/20200916025030.3992991-1-liushixin2@huawei.com Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
121432e870
commit
936dc95d09
1 changed files with 2 additions and 14 deletions
|
@ -439,26 +439,14 @@ snic_trc_seq_show(struct seq_file *sfp, void *data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct seq_operations snic_trc_seq_ops = {
|
static const struct seq_operations snic_trc_sops = {
|
||||||
.start = snic_trc_seq_start,
|
.start = snic_trc_seq_start,
|
||||||
.next = snic_trc_seq_next,
|
.next = snic_trc_seq_next,
|
||||||
.stop = snic_trc_seq_stop,
|
.stop = snic_trc_seq_stop,
|
||||||
.show = snic_trc_seq_show,
|
.show = snic_trc_seq_show,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
DEFINE_SEQ_ATTRIBUTE(snic_trc);
|
||||||
snic_trc_open(struct inode *inode, struct file *filp)
|
|
||||||
{
|
|
||||||
return seq_open(filp, &snic_trc_seq_ops);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct file_operations snic_trc_fops = {
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
.open = snic_trc_open,
|
|
||||||
.read = seq_read,
|
|
||||||
.llseek = seq_lseek,
|
|
||||||
.release = seq_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* snic_trc_debugfs_init : creates trace/tracing_enable files for trace
|
* snic_trc_debugfs_init : creates trace/tracing_enable files for trace
|
||||||
|
|
Loading…
Reference in a new issue