]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/staging/dgrp/dgrp_mon_ops.c
procfs: new helper - PDE_DATA(inode)
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / dgrp / dgrp_mon_ops.c
index 52493b5c1673c29fb3ff3e4887cfd9680dd2552d..6edbbf069150b7b4b279cf5c81d578828dcb2da8 100644 (file)
@@ -67,7 +67,6 @@ const struct file_operations dgrp_mon_ops = {
 static int dgrp_mon_open(struct inode *inode, struct file *file)
 {
        struct nd_struct *nd;
-       struct proc_dir_entry *de;
        struct timeval tv;
        uint32_t time;
        u8 *buf;
@@ -95,13 +94,7 @@ static int dgrp_mon_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;