Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / linux / debugfs.h
index 6dc7e3e..047567d 100644 (file)
 #ifndef _DEBUGFS_H_
 #define _DEBUGFS_H_
 
+#include <linux/fs.h>
+
+#include <linux/types.h>
+
+struct file_operations;
+
+struct debugfs_blob_wrapper {
+       void *data;
+       unsigned long size;
+};
+
 #if defined(CONFIG_DEBUG_FS)
 struct dentry *debugfs_create_file(const char *name, mode_t mode,
                                   struct dentry *parent, void *data,
-                                  struct file_operations *fops);
+                                  const struct file_operations *fops);
 
 struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
 
@@ -33,7 +44,13 @@ struct dentry *debugfs_create_u32(const char *name, mode_t mode,
 struct dentry *debugfs_create_bool(const char *name, mode_t mode,
                                  struct dentry *parent, u32 *value);
 
+struct dentry *debugfs_create_blob(const char *name, mode_t mode,
+                                 struct dentry *parent,
+                                 struct debugfs_blob_wrapper *blob);
 #else
+
+#include <linux/err.h>
+
 /* 
  * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled
  * so users have a chance to detect if there was a real error or not.  We don't
@@ -41,9 +58,8 @@ struct dentry *debugfs_create_bool(const char *name, mode_t mode,
  */
 
 static inline struct dentry *debugfs_create_file(const char *name, mode_t mode,
-                                                struct dentry *parent,
-                                                void *data,
-                                                struct file_operations *fops)
+                                       struct dentry *parent, void *data,
+                                       const struct file_operations *fops)
 {
        return ERR_PTR(-ENODEV);
 }
@@ -66,21 +82,28 @@ static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode,
 
 static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode,
                                                struct dentry *parent,
-                                               u8 *value)
+                                               u16 *value)
 {
        return ERR_PTR(-ENODEV);
 }
 
 static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode,
                                                struct dentry *parent,
-                                               u8 *value)
+                                               u32 *value)
 {
        return ERR_PTR(-ENODEV);
 }
 
 static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
                                                 struct dentry *parent,
-                                                u8 *value)
+                                                u32 *value)
+{
+       return ERR_PTR(-ENODEV);
+}
+
+static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode,
+                                 struct dentry *parent,
+                                 struct debugfs_blob_wrapper *blob)
 {
        return ERR_PTR(-ENODEV);
 }