[PATCH v1 04/19] uvcvideo: Create separate debugfs entries for each streaming interface.

Pawel Osciak
2013-08-30T02:17:35Z

Add interface number to debugfs entry name to be able to create separate
entries for each streaming interface for devices exposing more than one,
instead of failing to create more than one.

Signed-off-by: Pawel Osciak <posciak@chromium.org>
---
drivers/media/usb/uvc/uvc_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc/uvc_debugfs.c
index 14561a5..0663fbd 100644
--- a/drivers/media/usb/uvc/uvc_debugfs.c
+++ b/drivers/media/usb/uvc/uvc_debugfs.c
@@ -84,7 +84,8 @@ int uvc_debugfs_init_stream(struct uvc_streaming *stream)
if (uvc_debugfs_root_dir == NULL)
return -ENODEV;

- sprintf(dir_name, "%u-%u", udev->bus->busnum, udev->devnum);
+ sprintf(dir_name, "%u-%u-%u", udev->bus->busnum, udev->devnum,
+ stream->intfnum);

dent = debugfs_create_dir(dir_name, uvc_debugfs_root_dir);
if (IS_ERR_OR_NULL(dent)) {
--
1.8.4