#include <linux/types.h>
#include <linux/slab.h>
-// kernel config is here (procfs flag)
-
-#ifdef CONFIG_PROC_FS
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/uaccess.h>
-#endif
-
#include "videocodec.h"
static int videocodec_debug;
}
EXPORT_SYMBOL(videocodec_unregister);
-#ifdef CONFIG_PROC_FS
-static int proc_videocodecs_show(struct seq_file *m, void *v)
+int videocodec_debugfs_show(struct seq_file *m)
{
struct codec_list *h = codeclist_top;
struct attached_list *a;
return 0;
}
-#endif
/* ===================== */
/* hook in driver module */
/* ===================== */
static int __init videocodec_init(void)
{
-#ifdef CONFIG_PROC_FS
- static struct proc_dir_entry *videocodec_proc_entry;
-#endif
-
pr_info("Linux video codec intermediate layer: %s\n", VIDEOCODEC_VERSION);
-#ifdef CONFIG_PROC_FS
- videocodec_proc_entry = proc_create_single("videocodecs", 0, NULL, proc_videocodecs_show);
- if (!videocodec_proc_entry)
- pr_err("videocodec: can't init procfs.\n");
-#endif
return 0;
}
static void __exit videocodec_exit(void)
{
-#ifdef CONFIG_PROC_FS
- remove_proc_entry("videocodecs", NULL);
-#endif
}
module_init(videocodec_init);
#ifndef __LINUX_VIDEOCODEC_H
#define __LINUX_VIDEOCODEC_H
+#include <linux/debugfs.h>
#include <linux/videodev2.h>
#define CODEC_DO_COMPRESSION 0
/* the other calls are directly done via the videocodec structure! */
+int videocodec_debugfs_show(struct seq_file *m);
+
#endif /*ifndef __LINUX_VIDEOCODEC_H */