aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/bpqether.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-13 19:44:18 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:23:35 +0200
commitfddda2b7b521185f3aa018f9559eb33b0aee53a9 (patch)
treeece18b3d82822f8eaefd8b0afa2f93307e83b253 /drivers/net/hamradio/bpqether.c
parentproc: add a proc_create_reg helper (diff)
downloadlinux-dev-fddda2b7b521185f3aa018f9559eb33b0aee53a9.tar.xz
linux-dev-fddda2b7b521185f3aa018f9559eb33b0aee53a9.zip
proc: introduce proc_create_seq{,_data}
Variants of proc_create{,_data} that directly take a struct seq_operations argument and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--drivers/net/hamradio/bpqether.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index dfabbae72efd..f347fd9c5b28 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -449,20 +449,6 @@ static const struct seq_operations bpq_seqops = {
.show = bpq_seq_show,
};
-static int bpq_info_open(struct inode *inode, struct file *file)
-{
- return seq_open(file, &bpq_seqops);
-}
-
-static const struct file_operations bpq_info_fops = {
- .owner = THIS_MODULE,
- .open = bpq_info_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
-};
-
-
/* ------------------------------------------------------------------------ */
static const struct net_device_ops bpq_netdev_ops = {
@@ -590,7 +576,7 @@ static int bpq_device_event(struct notifier_block *this,
static int __init bpq_init_driver(void)
{
#ifdef CONFIG_PROC_FS
- if (!proc_create("bpqether", 0444, init_net.proc_net, &bpq_info_fops)) {
+ if (!proc_create_seq("bpqether", 0444, init_net.proc_net, &bpq_seqops)) {
printk(KERN_ERR
"bpq: cannot create /proc/net/bpqether entry.\n");
return -ENOENT;