diff options
author | Janne Grunau <j@jannau.net> | 2009-03-26 18:40:55 +0100 |
---|---|---|
committer | Janne Grunau <j@jannau.net> | 2009-03-26 18:40:55 +0100 |
commit | b16183f4e679f7248f72e89d10dfcf73cfb83d49 (patch) | |
tree | 873bf37ac79fa9552e2c87a5647dd3be89e3ed74 /linux/drivers/media/video/hdpvr | |
parent | f3ac90549a85ff26ab911d4daf8d57ebb39293c9 (diff) | |
download | mediapointer-dvb-s2-b16183f4e679f7248f72e89d10dfcf73cfb83d49.tar.gz mediapointer-dvb-s2-b16183f4e679f7248f72e89d10dfcf73cfb83d49.tar.bz2 |
hdpvr: set usb interface dev as parent in struct video_device
From: Janne Grunau <j@jannau.net>
Priority: normal
Signed-off-by: Janne Grunau <j@jannau.net>
Diffstat (limited to 'linux/drivers/media/video/hdpvr')
-rw-r--r-- | linux/drivers/media/video/hdpvr/hdpvr-core.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/hdpvr/hdpvr-video.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/hdpvr/hdpvr.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/linux/drivers/media/video/hdpvr/hdpvr-core.c b/linux/drivers/media/video/hdpvr/hdpvr-core.c index e96aed42d..2c49862b6 100644 --- a/linux/drivers/media/video/hdpvr/hdpvr-core.c +++ b/linux/drivers/media/video/hdpvr/hdpvr-core.c @@ -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; diff --git a/linux/drivers/media/video/hdpvr/hdpvr-video.c b/linux/drivers/media/video/hdpvr/hdpvr-video.c index d63bfccf7..9560e19d7 100644 --- a/linux/drivers/media/video/hdpvr/hdpvr-video.c +++ b/linux/drivers/media/video/hdpvr/hdpvr-video.c @@ -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)) { diff --git a/linux/drivers/media/video/hdpvr/hdpvr.h b/linux/drivers/media/video/hdpvr/hdpvr.h index 9bc8051b5..3af415d81 100644 --- a/linux/drivers/media/video/hdpvr/hdpvr.h +++ b/linux/drivers/media/video/hdpvr/hdpvr.h @@ -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); |