diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-30 01:03:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:08 -0400 |
commit | af064cdde64d58feb315dba268e1f8439fb935be (patch) | |
tree | 1115d561fc96ef1cf63aac3cf888041c7e7166e5 /drivers/staging/dgrp/dgrp_net_ops.c | |
parent | 08f3d07ddd53ca3bf322ddebc0f8992e3112520f (diff) | |
download | op-kernel-dev-af064cdde64d58feb315dba268e1f8439fb935be.zip op-kernel-dev-af064cdde64d58feb315dba268e1f8439fb935be.tar.gz |
dgrp procfs fixes, part 5: per-node files
this "hooks" scheme is pointless - just make file_operations non-static
and consolidate initialiazation bits.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging/dgrp/dgrp_net_ops.c')
-rw-r--r-- | drivers/staging/dgrp/dgrp_net_ops.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c index e6018823..dc826b2 100644 --- a/drivers/staging/dgrp/dgrp_net_ops.c +++ b/drivers/staging/dgrp/dgrp_net_ops.c @@ -72,7 +72,7 @@ static long dgrp_net_ioctl(struct file *file, unsigned int cmd, static unsigned int dgrp_net_select(struct file *file, struct poll_table_struct *table); -static const struct file_operations net_ops = { +const struct file_operations dgrp_net_ops = { .owner = THIS_MODULE, .read = dgrp_net_read, .write = dgrp_net_write, @@ -82,23 +82,6 @@ static const struct file_operations net_ops = { .release = dgrp_net_release, }; -static struct inode_operations net_inode_ops = { - .permission = dgrp_inode_permission -}; - -void dgrp_register_net_hook(struct proc_dir_entry *de) -{ - struct nd_struct *node = de->data; - - de->proc_iops = &net_inode_ops; - de->proc_fops = &net_ops; - node->nd_net_de = de; - sema_init(&node->nd_net_semaphore, 1); - node->nd_state = NS_CLOSED; - dgrp_create_node_class_sysfs_files(node); -} - - /** * dgrp_dump() -- prints memory for debugging purposes. * @mem: Memory location which should be printed to the console |