Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124458
b: refs/heads/master
c: 9bea351
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent b1227aa commit b282f19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc93a70cc7f92e1dbaf29fa7dfd914b0f618fb31
refs/heads/master: 9bea3514dd4a44490b53cc52498b2967e48056dd
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <asm/system.h>

#include <media/v4l2-common.h>
#include <media/v4l2-device.h>

#define VIDEO_NUM_DEVICES 256
#define VIDEO_NAME "video4linux"
Expand Down Expand Up @@ -407,6 +408,8 @@ int video_register_device_index(struct video_device *vdev, int type, int nr,

vdev->vfl_type = type;
vdev->cdev = NULL;
if (vdev->v4l2_dev)
vdev->parent = vdev->v4l2_dev->dev;

/* Part 2: find a free minor, kernel number and device index. */
#ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/media/v4l2-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define VFL_TYPE_MAX 4

struct v4l2_ioctl_callbacks;
struct v4l2_device;

/* Flag to mark the video_device struct as unregistered.
Drivers can set this flag if they want to block all future
Expand All @@ -45,7 +46,10 @@ struct video_device
/* sysfs */
struct device dev; /* v4l device */
struct cdev *cdev; /* character device */

/* Set either parent or v4l2_dev if your driver uses v4l2_device */
struct device *parent; /* device parent */
struct v4l2_device *v4l2_dev; /* v4l2_device parent */

/* device info */
char name[32];
Expand Down

0 comments on commit b282f19

Please sign in to comment.