}
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;
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();
*(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)) {
/*========================================================================*/
/* 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);