14 #include <linux/module.h>
16 #include <linux/slab.h>
25 #define UVC_DEBUGFS_BUF_SIZE 1024
47 static ssize_t uvc_debugfs_stats_read(
struct file *
file,
char __user *user_buf,
48 size_t nbytes, loff_t *ppos)
66 .open = uvc_debugfs_stats_open,
68 .read = uvc_debugfs_stats_read,
69 .release = uvc_debugfs_stats_release,
76 static struct dentry *uvc_debugfs_root_dir;
80 struct usb_device *
udev = stream->
dev->udev;
84 if (uvc_debugfs_root_dir ==
NULL)
87 sprintf(dir_name,
"%u-%u", udev->bus->busnum, udev->devnum);
90 if (IS_ERR_OR_NULL(dent)) {
92 "directory.\n", dir_name);
99 stream, &uvc_debugfs_stats_fops);
100 if (IS_ERR_OR_NULL(dent)) {
123 if (IS_ERR_OR_NULL(dir)) {
128 uvc_debugfs_root_dir = dir;
134 if (uvc_debugfs_root_dir !=
NULL)