]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/debugfs/file.c
V4L/DVB (5477): CodingStyle cleanups on for loops at bttv-cards.c
[linux-2.6-omap-h63xx.git] / fs / debugfs / file.c
index 8d130cc8532248893f2bf5e9af3cf152ad08d3b5..682f928b7f4d09e1950ff185f0447dea0869a466 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/pagemap.h>
+#include <linux/namei.h>
 #include <linux/debugfs.h>
 
 static ssize_t default_read_file(struct file *file, char __user *buf,
@@ -44,6 +45,17 @@ const struct file_operations debugfs_file_operations = {
        .open =         default_open,
 };
 
+static void *debugfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+{
+       nd_set_link(nd, dentry->d_inode->i_private);
+       return NULL;
+}
+
+const struct inode_operations debugfs_link_operations = {
+       .readlink       = generic_readlink,
+       .follow_link    = debugfs_follow_link,
+};
+
 static void debugfs_u8_set(void *data, u64 val)
 {
        *(u8 *)data = val;