Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change uvc video node #89

Open
wants to merge 1 commit into
base: celadon/u/mr0/master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/media/usb/uvc/uvc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ int uvc_register_video_device(struct uvc_device *dev,
*/
video_set_drvdata(vdev, stream);

ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, 50);
if (ret < 0) {
dev_err(&stream->intf->dev,
"Failed to register %s device (%d).\n",
Expand Down
5 changes: 5 additions & 0 deletions drivers/media/v4l2-core/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,10 @@ int __video_register_device(struct video_device *vdev,

/* Part 1: check device type */
switch (type) {
case VFL_TYPE_UVC:
name_base = "uvcvideo";
type = VFL_TYPE_VIDEO;
break;
case VFL_TYPE_VIDEO:
name_base = "video";
break;
Expand All @@ -931,6 +935,7 @@ int __video_register_device(struct video_device *vdev,
__func__, type);
return -EINVAL;
}
pr_err("video base name:%s\n", name_base);

vdev->vfl_type = type;
vdev->cdev = NULL;
Expand Down
1 change: 1 addition & 0 deletions include/media/v4l2-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ enum vfl_devnode_type {
VFL_TYPE_SUBDEV,
VFL_TYPE_SDR,
VFL_TYPE_TOUCH,
VFL_TYPE_UVC,
VFL_TYPE_MAX /* Shall be the last one */
};

Expand Down
Loading