procfs: new helper - PDE_DATA(inode)
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / dgrp / dgrp_dpa_ops.c
index cfa8e82404f914a8ff225887c7b363d7e67ddbd3..43209c163a43c43401b4e2851b6e073c3970ff73 100644 (file)
@@ -113,8 +113,6 @@ static int dgrp_dpa_open(struct inode *inode, struct file *file)
        struct nd_struct *nd;
        int rtn = 0;
 
-       struct proc_dir_entry *de;
-
        rtn = try_module_get(THIS_MODULE);
        if (!rtn)
                return -ENXIO;
@@ -137,12 +135,7 @@ static int dgrp_dpa_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;