Commit a50ab291 authored by Janne Grunau's avatar Janne Grunau Committed by Mauro Carvalho Chehab

V4L/DVB (11229): hdpvr: set usb interface dev as parent in struct video_device

Signed-off-by: default avatarJanne Grunau <j@jannau.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d211bfcb
...@@ -342,7 +342,7 @@ static int hdpvr_probe(struct usb_interface *interface, ...@@ -342,7 +342,7 @@ static int hdpvr_probe(struct usb_interface *interface,
} }
mutex_unlock(&dev->io_mutex); mutex_unlock(&dev->io_mutex);
if (hdpvr_register_videodev(dev, if (hdpvr_register_videodev(dev, &interface->dev,
video_nr[atomic_inc_return(&dev_nr)])) { video_nr[atomic_inc_return(&dev_nr)])) {
err("registering videodev failed"); err("registering videodev failed");
goto error; goto error;
......
...@@ -1193,7 +1193,8 @@ static const struct video_device hdpvr_video_template = { ...@@ -1193,7 +1193,8 @@ static const struct video_device hdpvr_video_template = {
V4L2_STD_PAL_60, V4L2_STD_PAL_60,
}; };
int hdpvr_register_videodev(struct hdpvr_device *dev, int devnum) int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
int devnum)
{ {
/* setup and register video device */ /* setup and register video device */
dev->video_dev = video_device_alloc(); dev->video_dev = video_device_alloc();
...@@ -1204,7 +1205,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, int devnum) ...@@ -1204,7 +1205,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, int devnum)
*(dev->video_dev) = hdpvr_video_template; *(dev->video_dev) = hdpvr_video_template;
strcpy(dev->video_dev->name, "Hauppauge HD PVR"); strcpy(dev->video_dev->name, "Hauppauge HD PVR");
dev->video_dev->parent = &dev->udev->dev; dev->video_dev->parent = parent;
video_set_drvdata(dev->video_dev, dev); video_set_drvdata(dev->video_dev, dev);
if (video_register_device(dev->video_dev, VFL_TYPE_GRABBER, devnum)) { if (video_register_device(dev->video_dev, VFL_TYPE_GRABBER, devnum)) {
......
...@@ -284,7 +284,8 @@ int get_input_lines_info(struct hdpvr_device *dev); ...@@ -284,7 +284,8 @@ int get_input_lines_info(struct hdpvr_device *dev);
/*========================================================================*/ /*========================================================================*/
/* v4l2 registration */ /* v4l2 registration */
int hdpvr_register_videodev(struct hdpvr_device *dev, int devnumber); int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
int devnumber);
int hdpvr_cancel_queue(struct hdpvr_device *dev); int hdpvr_cancel_queue(struct hdpvr_device *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment