]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/s390/hypfs/hypfs.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / s390 / hypfs / hypfs.h
index fa487d4cc08b9c1e9585624c38d2cf30ff75e049..80c1526f2af3f60a809386a4fb7f60e2cbfbbc12 100644 (file)
@@ -12,6 +12,8 @@
 #include <linux/fs.h>
 #include <linux/types.h>
 #include <linux/debugfs.h>
+#include <linux/workqueue.h>
+#include <linux/kref.h>
 
 #define REG_FILE_MODE    0440
 #define UPDATE_FILE_MODE 0220
@@ -38,6 +40,33 @@ extern int hypfs_vm_init(void);
 extern void hypfs_vm_exit(void);
 extern int hypfs_vm_create_files(struct super_block *sb, struct dentry *root);
 
-/* Directory for debugfs files */
-extern struct dentry *hypfs_dbfs_dir;
+/* debugfs interface */
+struct hypfs_dbfs_file;
+
+struct hypfs_dbfs_data {
+       void                    *buf;
+       void                    *buf_free_ptr;
+       size_t                  size;
+       struct hypfs_dbfs_file  *dbfs_file;;
+       struct kref             kref;
+};
+
+struct hypfs_dbfs_file {
+       const char      *name;
+       int             (*data_create)(void **data, void **data_free_ptr,
+                                      size_t *size);
+       void            (*data_free)(const void *buf_free_ptr);
+
+       /* Private data for hypfs_dbfs.c */
+       struct hypfs_dbfs_data  *data;
+       struct delayed_work     data_free_work;
+       struct mutex            lock;
+       struct dentry           *dentry;
+};
+
+extern int hypfs_dbfs_init(void);
+extern void hypfs_dbfs_exit(void);
+extern int hypfs_dbfs_create_file(struct hypfs_dbfs_file *df);
+extern void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df);
+
 #endif /* _HYPFS_H_ */