diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-10 19:42:55 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 07:24:30 +0200 |
commit | c3506372277779fccbffee2475400fcd689d5738 (patch) | |
tree | d45d820f96a84a1223fa84c6ad4b7d84a81399aa /net/wireless/wext-proc.c | |
parent | a2dcdee3748b664bf011b4b12de64e945dd4c8c2 (diff) |
proc: introduce proc_create_net{,_data}
Variants of proc_create{,_data} that directly take a struct seq_operations
and deal with network namespaces in ->open and ->release. All callers of
proc_create + seq_open_net converted over, and seq_{open,release}_net are
removed entirely.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/wireless/wext-proc.c')
-rw-r--r-- | net/wireless/wext-proc.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/net/wireless/wext-proc.c b/net/wireless/wext-proc.c index b4c464594a5e..cadcf8613af2 100644 --- a/net/wireless/wext-proc.c +++ b/net/wireless/wext-proc.c @@ -126,24 +126,11 @@ static const struct seq_operations wireless_seq_ops = { .show = wireless_dev_seq_show, }; -static int seq_open_wireless(struct inode *inode, struct file *file) -{ - return seq_open_net(inode, file, &wireless_seq_ops, - sizeof(struct seq_net_private)); -} - -static const struct file_operations wireless_seq_fops = { - .open = seq_open_wireless, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release_net, -}; - int __net_init wext_proc_init(struct net *net) { /* Create /proc/net/wireless entry */ - if (!proc_create("wireless", 0444, net->proc_net, - &wireless_seq_fops)) + if (!proc_create_net("wireless", 0444, net->proc_net, + &wireless_seq_ops, sizeof(struct seq_net_private))) return -ENOMEM; return 0; |