]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
V4L/DVB (11229): hdpvr: set usb interface dev as parent in struct video_device
authorJanne Grunau <j@jannau.net>
Thu, 26 Mar 2009 17:40:55 +0000 (14:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:42 +0000 (12:43 -0300)
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/hdpvr/hdpvr-core.c
drivers/media/video/hdpvr/hdpvr-video.c
drivers/media/video/hdpvr/hdpvr.h

index e96aed42d19201353c147362489e5e1afb2978d3..2c49862b6d3264bd897695da272125a6b2c37dc7 100644 (file)
@@ -342,7 +342,7 @@ static int hdpvr_probe(struct usb_interface *interface,
        }
        mutex_unlock(&dev->io_mutex);
 
-       if (hdpvr_register_videodev(dev,
+       if (hdpvr_register_videodev(dev, &interface->dev,
                                    video_nr[atomic_inc_return(&dev_nr)])) {
                err("registering videodev failed");
                goto error;
index d63bfccf784e5005425427a3b6a6a672bae68e5c..9560e19d7cf01d6b77f97529cca40723436b08b3 100644 (file)
@@ -1193,7 +1193,8 @@ static const struct video_device hdpvr_video_template = {
                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 */
        dev->video_dev = video_device_alloc();
@@ -1204,7 +1205,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, int devnum)
 
        *(dev->video_dev) = hdpvr_video_template;
        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);
 
        if (video_register_device(dev->video_dev, VFL_TYPE_GRABBER, devnum)) {
index 9bc8051b597dbcfc36ac9ca0b6e95a2abc6402db..3af415d81df7b1ac37d9c38e882ea1c1c272c500 100644 (file)
@@ -284,7 +284,8 @@ int get_input_lines_info(struct hdpvr_device *dev);
 
 /*========================================================================*/
 /* 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);