RDMA/ocrdma: Convert to use simple_open()
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Wed, 16 Apr 2014 01:37:49 +0000 (09:37 +0800)
committerRoland Dreier <roland@purestorage.com>
Tue, 20 May 2014 00:55:54 +0000 (17:55 -0700)
This removes an open-coded duplicate of simple_open().

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ocrdma/ocrdma_stats.c

index 6c54106f5e64119cfd9c50f60fd3ab58ade5af84..41a9aec9998d103f81dc325129cdab47bd20e2ff 100644 (file)
@@ -510,16 +510,9 @@ exit:
        return status;
 }
 
-static int ocrdma_debugfs_open(struct inode *inode, struct file *file)
-{
-       if (inode->i_private)
-               file->private_data = inode->i_private;
-       return 0;
-}
-
 static const struct file_operations ocrdma_dbg_ops = {
        .owner = THIS_MODULE,
-       .open = ocrdma_debugfs_open,
+       .open = simple_open,
        .read = ocrdma_dbgfs_ops_read,
 };