aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/dgrp/dgrp_net_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/dgrp/dgrp_net_ops.c')
-rw-r--r--drivers/staging/dgrp/dgrp_net_ops.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c
index 64f48ffb9d4..5b7833f593f 100644
--- a/drivers/staging/dgrp/dgrp_net_ops.c
+++ b/drivers/staging/dgrp/dgrp_net_ops.c
@@ -35,7 +35,7 @@
#include <linux/module.h>
#include <linux/proc_fs.h>
-#include <linux/types.h>
+#include <linux/slab.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/tty.h>
@@ -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;
- rcu_assign_pointer(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
@@ -801,7 +784,6 @@ out_err:
static int dgrp_net_open(struct inode *inode, struct file *file)
{
struct nd_struct *nd;
- struct proc_dir_entry *de;
ulong lock_flags;
int rtn;
@@ -825,13 +807,7 @@ static int dgrp_net_open(struct inode *inode, struct file *file)
/*
* Get the node pointer, and fail if it doesn't exist.
*/
- de = PDE(inode);
- if (!de) {
- rtn = -ENXIO;
- goto done;
- }
-
- nd = (struct nd_struct *) de->data;
+ nd = PDE_DATA(inode);
if (!nd) {
rtn = -ENXIO;
goto done;