diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-06-10 14:16:25 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-21 16:03:57 +0200 |
commit | a28fbd04facbffe9374f25c3a19c54ce4f186361 (patch) | |
tree | 6f5830d257ac19a82f3a7790cf9e714f1eba651c /drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | |
parent | [media] saa7164: add v4l2_device and replace parent with v4l2_dev (diff) | |
download | linux-a28fbd04facbffe9374f25c3a19c54ce4f186361.tar.xz linux-a28fbd04facbffe9374f25c3a19c54ce4f186361.zip |
[media] pvrusb2: use v4l2_dev instead of the deprecated parent field
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 82f619ba5cca..d77069e12dc4 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -31,6 +31,7 @@ #include <linux/videodev2.h> #include <linux/module.h> #include <media/v4l2-dev.h> +#include <media/v4l2-device.h> #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> @@ -870,8 +871,8 @@ static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) static void pvr2_v4l2_dev_disassociate_parent(struct pvr2_v4l2_dev *dip) { if (!dip) return; - if (!dip->devbase.parent) return; - dip->devbase.parent = NULL; + if (!dip->devbase.v4l2_dev->dev) return; + dip->devbase.v4l2_dev->dev = NULL; device_move(&dip->devbase.dev, NULL, DPM_ORDER_NONE); } @@ -1321,7 +1322,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, if (nr_ptr && (unit_number >= 0) && (unit_number < PVR_NUM)) { mindevnum = nr_ptr[unit_number]; } - dip->devbase.parent = &usbdev->dev; + pvr2_hdw_set_v4l2_dev(hdw, &dip->devbase); if ((video_register_device(&dip->devbase, dip->v4l_type, mindevnum) < 0) && (video_register_device(&dip->devbase, |