aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c4
-rw-r--r--drivers/media/video/cafe_ccic.c2
-rw-r--r--drivers/media/video/cx18/cx18-streams.c2
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c2
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c2
-rw-r--r--drivers/media/video/cx88/cx88-core.c2
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/video/gspca/gspca.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-streams.c2
-rw-r--r--drivers/media/video/meye.c2
-rw-r--r--drivers/media/video/mt9m001.c2
-rw-r--r--drivers/media/video/ov511.c2
-rw-r--r--drivers/media/video/pwc/pwc-if.c2
-rw-r--r--drivers/media/video/s2255drv.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c2
-rw-r--r--drivers/media/video/soc_camera.c10
-rw-r--r--drivers/media/video/stk-webcam.c2
-rw-r--r--drivers/media/video/stv680.c2
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c2
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c2
-rw-r--r--drivers/media/video/uvc/uvc_driver.c2
-rw-r--r--drivers/media/video/v4l2-dev.c6
-rw-r--r--drivers/media/video/w9968cf.c2
24 files changed, 31 insertions, 31 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 0ea559a7fe59..3dda84d115d1 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -164,7 +164,7 @@ static ssize_t show_card(struct device *cd,
164 struct device_attribute *attr, char *buf) 164 struct device_attribute *attr, char *buf)
165{ 165{
166 struct video_device *vfd = container_of(cd, struct video_device, class_dev); 166 struct video_device *vfd = container_of(cd, struct video_device, class_dev);
167 struct bttv *btv = dev_get_drvdata(vfd->dev); 167 struct bttv *btv = dev_get_drvdata(vfd->parent);
168 return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET); 168 return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
169} 169}
170static DEVICE_ATTR(card, S_IRUGO, show_card, NULL); 170static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
@@ -4185,7 +4185,7 @@ static struct video_device *vdev_init(struct bttv *btv,
4185 return NULL; 4185 return NULL;
4186 *vfd = *template; 4186 *vfd = *template;
4187 vfd->minor = -1; 4187 vfd->minor = -1;
4188 vfd->dev = &btv->c.pci->dev; 4188 vfd->parent = &btv->c.pci->dev;
4189 vfd->release = video_device_release; 4189 vfd->release = video_device_release;
4190 vfd->type = type; 4190 vfd->type = type;
4191 vfd->debug = bttv_debug; 4191 vfd->debug = bttv_debug;
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index d99453faaab7..ebcc8ad6271f 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -2157,7 +2157,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
2157 cam->v4ldev = cafe_v4l_template; 2157 cam->v4ldev = cafe_v4l_template;
2158 cam->v4ldev.debug = 0; 2158 cam->v4ldev.debug = 0;
2159// cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG; 2159// cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG;
2160 cam->v4ldev.dev = &pdev->dev; 2160 cam->v4ldev.parent = &pdev->dev;
2161 ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1); 2161 ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1);
2162 if (ret) 2162 if (ret)
2163 goto out_smbus; 2163 goto out_smbus;
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 1728b1d832a9..210a2416b320 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -194,7 +194,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
194 cx->num); 194 cx->num);
195 195
196 s->v4l2dev->minor = minor; 196 s->v4l2dev->minor = minor;
197 s->v4l2dev->dev = &cx->dev->dev; 197 s->v4l2dev->parent = &cx->dev->dev;
198 s->v4l2dev->fops = cx18_stream_info[type].fops; 198 s->v4l2dev->fops = cx18_stream_info[type].fops;
199 s->v4l2dev->release = video_device_release; 199 s->v4l2dev->release = video_device_release;
200 s->v4l2dev->tvnorms = V4L2_STD_ALL; 200 s->v4l2dev->tvnorms = V4L2_STD_ALL;
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index e7ef093265af..1b252976edac 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -1766,7 +1766,7 @@ static struct video_device *cx23885_video_dev_alloc(
1766 vfd->minor = -1; 1766 vfd->minor = -1;
1767 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name, 1767 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name,
1768 type, cx23885_boards[tsport->dev->board].name); 1768 type, cx23885_boards[tsport->dev->board].name);
1769 vfd->dev = &pci->dev; 1769 vfd->parent = &pci->dev;
1770 vfd->release = video_device_release; 1770 vfd->release = video_device_release;
1771 return vfd; 1771 return vfd;
1772} 1772}
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index 043fc4e5c586..3b807ba874f1 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -326,7 +326,7 @@ struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
326 return NULL; 326 return NULL;
327 *vfd = *template; 327 *vfd = *template;
328 vfd->minor = -1; 328 vfd->minor = -1;
329 vfd->dev = &pci->dev; 329 vfd->parent = &pci->dev;
330 vfd->release = video_device_release; 330 vfd->release = video_device_release;
331 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", 331 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
332 dev->name, type, cx23885_boards[dev->board].name); 332 dev->name, type, cx23885_boards[dev->board].name);
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index 60eeda3057e9..2c0582e05594 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -1006,7 +1006,7 @@ struct video_device *cx88_vdev_init(struct cx88_core *core,
1006 return NULL; 1006 return NULL;
1007 *vfd = *template; 1007 *vfd = *template;
1008 vfd->minor = -1; 1008 vfd->minor = -1;
1009 vfd->dev = &pci->dev; 1009 vfd->parent = &pci->dev;
1010 vfd->release = video_device_release; 1010 vfd->release = video_device_release;
1011 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", 1011 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
1012 core->name, type, core->board.name); 1012 core->name, type, core->board.name);
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 2d9f14d2a00b..838e7ecfd865 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1892,7 +1892,7 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
1892 return NULL; 1892 return NULL;
1893 *vfd = *template; 1893 *vfd = *template;
1894 vfd->minor = -1; 1894 vfd->minor = -1;
1895 vfd->dev = &dev->udev->dev; 1895 vfd->parent = &dev->udev->dev;
1896 vfd->release = video_device_release; 1896 vfd->release = video_device_release;
1897 vfd->type = type; 1897 vfd->type = type;
1898 vfd->debug = video_debug; 1898 vfd->debug = video_debug;
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 16e367cec760..f5b77deab72d 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1740,7 +1740,7 @@ int gspca_dev_probe(struct usb_interface *intf,
1740 1740
1741 /* init video stuff */ 1741 /* init video stuff */
1742 memcpy(&gspca_dev->vdev, &gspca_template, sizeof gspca_template); 1742 memcpy(&gspca_dev->vdev, &gspca_template, sizeof gspca_template);
1743 gspca_dev->vdev.dev = &dev->dev; 1743 gspca_dev->vdev.parent = &dev->dev;
1744 memcpy(&gspca_dev->fops, &dev_fops, sizeof gspca_dev->fops); 1744 memcpy(&gspca_dev->fops, &dev_fops, sizeof gspca_dev->fops);
1745 gspca_dev->vdev.fops = &gspca_dev->fops; 1745 gspca_dev->vdev.fops = &gspca_dev->fops;
1746 gspca_dev->fops.owner = module; /* module protection */ 1746 gspca_dev->fops.owner = module; /* module protection */
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c
index f8883b487f4a..b883c4e08fbd 100644
--- a/drivers/media/video/ivtv/ivtv-streams.c
+++ b/drivers/media/video/ivtv/ivtv-streams.c
@@ -217,7 +217,7 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
217 itv->num, s->name); 217 itv->num, s->name);
218 218
219 s->v4l2dev->minor = minor; 219 s->v4l2dev->minor = minor;
220 s->v4l2dev->dev = &itv->dev->dev; 220 s->v4l2dev->parent = &itv->dev->dev;
221 s->v4l2dev->fops = ivtv_stream_info[type].fops; 221 s->v4l2dev->fops = ivtv_stream_info[type].fops;
222 s->v4l2dev->release = video_device_release; 222 s->v4l2dev->release = video_device_release;
223 s->v4l2dev->tvnorms = V4L2_STD_ALL; 223 s->v4l2dev->tvnorms = V4L2_STD_ALL;
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 2fb5854cf6f0..0045367a66f1 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -1801,7 +1801,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1801 } 1801 }
1802 1802
1803 memcpy(meye.video_dev, &meye_template, sizeof(meye_template)); 1803 memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
1804 meye.video_dev->dev = &meye.mchip_dev->dev; 1804 meye.video_dev->parent = &meye.mchip_dev->dev;
1805 1805
1806 if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) { 1806 if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
1807 printk(KERN_ERR "meye: unable to power on the camera\n"); 1807 printk(KERN_ERR "meye: unable to power on the camera\n");
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index ee43499544c1..554d2295484e 100644
--- a/drivers/media/video/mt9m001.c
+++ b/drivers/media/video/mt9m001.c
@@ -120,7 +120,7 @@ static int mt9m001_init(struct soc_camera_device *icd)
120 int ret; 120 int ret;
121 121
122 /* Disable chip, synchronous option update */ 122 /* Disable chip, synchronous option update */
123 dev_dbg(icd->vdev->dev, "%s\n", __func__); 123 dev_dbg(icd->vdev->parent, "%s\n", __func__);
124 124
125 ret = reg_write(icd, MT9M001_RESET, 1); 125 ret = reg_write(icd, MT9M001_RESET, 1);
126 if (ret >= 0) 126 if (ret >= 0)
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index eafb0c7736e6..b72e5660bc19 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -5833,7 +5833,7 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id)
5833 goto error; 5833 goto error;
5834 5834
5835 memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev)); 5835 memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev));
5836 ov->vdev->dev = &intf->dev; 5836 ov->vdev->parent = &intf->dev;
5837 video_set_drvdata(ov->vdev, ov); 5837 video_set_drvdata(ov->vdev, ov);
5838 5838
5839 for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) { 5839 for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) {
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 423fa7c2d0c9..b4de82115e5b 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1767,7 +1767,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1767 return -ENOMEM; 1767 return -ENOMEM;
1768 } 1768 }
1769 memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template)); 1769 memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
1770 pdev->vdev->dev = &(udev->dev); 1770 pdev->vdev->parent = &(udev->dev);
1771 strcpy(pdev->vdev->name, name); 1771 strcpy(pdev->vdev->name, name);
1772 pdev->vdev->owner = THIS_MODULE; 1772 pdev->vdev->owner = THIS_MODULE;
1773 video_set_drvdata(pdev->vdev, pdev); 1773 video_set_drvdata(pdev->vdev, pdev);
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index 04eb2c3fabd8..5f8cd3de98e3 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -1706,7 +1706,7 @@ static int s2255_probe_v4l(struct s2255_dev *dev)
1706 /* register 4 video devices */ 1706 /* register 4 video devices */
1707 dev->vdev[i] = video_device_alloc(); 1707 dev->vdev[i] = video_device_alloc();
1708 memcpy(dev->vdev[i], &template, sizeof(struct video_device)); 1708 memcpy(dev->vdev[i], &template, sizeof(struct video_device));
1709 dev->vdev[i]->dev = &dev->interface->dev; 1709 dev->vdev[i]->parent = &dev->interface->dev;
1710 if (video_nr == -1) 1710 if (video_nr == -1)
1711 ret = video_register_device(dev->vdev[i], 1711 ret = video_register_device(dev->vdev[i],
1712 VFL_TYPE_GRABBER, 1712 VFL_TYPE_GRABBER,
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index cfee84ee7a88..f3e7a598e4b5 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -798,7 +798,7 @@ static struct video_device *vdev_init(struct saa7134_dev *dev,
798 return NULL; 798 return NULL;
799 *vfd = *template; 799 *vfd = *template;
800 vfd->minor = -1; 800 vfd->minor = -1;
801 vfd->dev = &dev->pci->dev; 801 vfd->parent = &dev->pci->dev;
802 vfd->release = video_device_release; 802 vfd->release = video_device_release;
803 vfd->debug = video_debug; 803 vfd->debug = video_debug;
804 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", 804 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 2a5ab957542d..3854cc29752d 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -465,7 +465,7 @@ static int empress_init(struct saa7134_dev *dev)
465 if (NULL == dev->empress_dev) 465 if (NULL == dev->empress_dev)
466 return -ENOMEM; 466 return -ENOMEM;
467 *(dev->empress_dev) = saa7134_empress_template; 467 *(dev->empress_dev) = saa7134_empress_template;
468 dev->empress_dev->dev = &dev->pci->dev; 468 dev->empress_dev->parent = &dev->pci->dev;
469 dev->empress_dev->release = video_device_release; 469 dev->empress_dev->release = video_device_release;
470 snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name), 470 snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name),
471 "%s empress (%s)", dev->name, 471 "%s empress (%s)", dev->name,
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index e39b98f1eca4..58c8c39b9597 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -193,7 +193,7 @@ static int soc_camera_open(struct inode *inode, struct file *file)
193 mutex_lock(&video_lock); 193 mutex_lock(&video_lock);
194 194
195 vdev = video_devdata(file); 195 vdev = video_devdata(file);
196 icd = container_of(vdev->dev, struct soc_camera_device, dev); 196 icd = container_of(vdev->parent, struct soc_camera_device, dev);
197 ici = to_soc_camera_host(icd->dev.parent); 197 ici = to_soc_camera_host(icd->dev.parent);
198 198
199 if (!try_module_get(icd->ops->owner)) { 199 if (!try_module_get(icd->ops->owner)) {
@@ -258,7 +258,7 @@ static int soc_camera_close(struct inode *inode, struct file *file)
258 258
259 vfree(icf); 259 vfree(icf);
260 260
261 dev_dbg(vdev->dev, "camera device close\n"); 261 dev_dbg(vdev->parent, "camera device close\n");
262 262
263 return 0; 263 return 0;
264} 264}
@@ -271,7 +271,7 @@ static ssize_t soc_camera_read(struct file *file, char __user *buf,
271 struct video_device *vdev = icd->vdev; 271 struct video_device *vdev = icd->vdev;
272 int err = -EINVAL; 272 int err = -EINVAL;
273 273
274 dev_err(vdev->dev, "camera device read not implemented\n"); 274 dev_err(vdev->parent, "camera device read not implemented\n");
275 275
276 return err; 276 return err;
277} 277}
@@ -877,7 +877,7 @@ int soc_camera_video_start(struct soc_camera_device *icd)
877 877
878 strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name)); 878 strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name));
879 /* Maybe better &ici->dev */ 879 /* Maybe better &ici->dev */
880 vdev->dev = &icd->dev; 880 vdev->parent = &icd->dev;
881 vdev->type = VID_TYPE_CAPTURE; 881 vdev->type = VID_TYPE_CAPTURE;
882 vdev->current_norm = V4L2_STD_UNKNOWN; 882 vdev->current_norm = V4L2_STD_UNKNOWN;
883 vdev->fops = &soc_camera_fops; 883 vdev->fops = &soc_camera_fops;
@@ -915,7 +915,7 @@ int soc_camera_video_start(struct soc_camera_device *icd)
915 915
916 err = video_register_device(vdev, VFL_TYPE_GRABBER, vdev->minor); 916 err = video_register_device(vdev, VFL_TYPE_GRABBER, vdev->minor);
917 if (err < 0) { 917 if (err < 0) {
918 dev_err(vdev->dev, "video_register_device failed\n"); 918 dev_err(vdev->parent, "video_register_device failed\n");
919 goto evidregd; 919 goto evidregd;
920 } 920 }
921 icd->vdev = vdev; 921 icd->vdev = vdev;
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index f308c38d744f..5998a5483194 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -1369,7 +1369,7 @@ static int stk_register_video_device(struct stk_camera *dev)
1369 1369
1370 dev->vdev = stk_v4l_data; 1370 dev->vdev = stk_v4l_data;
1371 dev->vdev.debug = debug; 1371 dev->vdev.debug = debug;
1372 dev->vdev.dev = &dev->interface->dev; 1372 dev->vdev.parent = &dev->interface->dev;
1373 dev->vdev.priv = dev; 1373 dev->vdev.priv = dev;
1374 err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1); 1374 err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1);
1375 if (err) 1375 if (err)
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c
index d7f130bedb5f..27e2f4aac13d 100644
--- a/drivers/media/video/stv680.c
+++ b/drivers/media/video/stv680.c
@@ -1454,7 +1454,7 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
1454 goto error; 1454 goto error;
1455 } 1455 }
1456 memcpy(stv680->vdev, &stv680_template, sizeof(stv680_template)); 1456 memcpy(stv680->vdev, &stv680_template, sizeof(stv680_template));
1457 stv680->vdev->dev = &intf->dev; 1457 stv680->vdev->parent = &intf->dev;
1458 video_set_drvdata(stv680->vdev, stv680); 1458 video_set_drvdata(stv680->vdev, stv680);
1459 1459
1460 memcpy (stv680->vdev->name, stv680->camera_name, strlen (stv680->camera_name)); 1460 memcpy (stv680->vdev->name, stv680->camera_name, strlen (stv680->camera_name));
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index 4128ee20b64e..7e6ab2910c13 100644
--- a/drivers/media/video/usbvideo/usbvideo.c
+++ b/drivers/media/video/usbvideo/usbvideo.c
@@ -1040,7 +1040,7 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
1040 err("%s: uvd->dev == NULL", __func__); 1040 err("%s: uvd->dev == NULL", __func__);
1041 return -EINVAL; 1041 return -EINVAL;
1042 } 1042 }
1043 uvd->vdev.dev = &uvd->dev->dev; 1043 uvd->vdev.parent = &uvd->dev->dev;
1044 if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { 1044 if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
1045 err("%s: video_register_device failed", __func__); 1045 err("%s: video_register_device failed", __func__);
1046 return -EPIPE; 1046 return -EPIPE;
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index cd6c41d67899..899906d954aa 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1506,7 +1506,7 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
1506 } 1506 }
1507 *vdev = *vdev_template; 1507 *vdev = *vdev_template;
1508// vdev->minor = -1; 1508// vdev->minor = -1;
1509 vdev->dev = &usb_dev->dev; 1509 vdev->parent = &usb_dev->dev;
1510 snprintf(vdev->name, sizeof(vdev->name), "%s", name); 1510 snprintf(vdev->name, sizeof(vdev->name), "%s", name);
1511 video_set_drvdata(vdev, usbvision); 1511 video_set_drvdata(vdev, usbvision);
1512 return vdev; 1512 return vdev;
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c
index f2b2983fe062..79d6821c4741 100644
--- a/drivers/media/video/uvc/uvc_driver.c
+++ b/drivers/media/video/uvc/uvc_driver.c
@@ -1458,7 +1458,7 @@ static int uvc_register_video(struct uvc_device *dev)
1458 * unregistered before the reference is released, so we don't need to 1458 * unregistered before the reference is released, so we don't need to
1459 * get another one. 1459 * get another one.
1460 */ 1460 */
1461 vdev->dev = &dev->intf->dev; 1461 vdev->parent = &dev->intf->dev;
1462 vdev->type = 0; 1462 vdev->type = 0;
1463 vdev->type2 = 0; 1463 vdev->type2 = 0;
1464 vdev->minor = -1; 1464 vdev->minor = -1;
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 2dd82b16bc35..9cc2cf1a1c93 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -201,7 +201,7 @@ static int get_index(struct video_device *vdev, int num)
201 for (i = 0; i < VIDEO_NUM_DEVICES; i++) { 201 for (i = 0; i < VIDEO_NUM_DEVICES; i++) {
202 if (video_device[i] != NULL && 202 if (video_device[i] != NULL &&
203 video_device[i] != vdev && 203 video_device[i] != vdev &&
204 video_device[i]->dev == vdev->dev) { 204 video_device[i]->parent == vdev->parent) {
205 used |= 1 << video_device[i]->index; 205 used |= 1 << video_device[i]->index;
206 } 206 }
207 } 207 }
@@ -323,8 +323,8 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
323 memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); 323 memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev));
324 vfd->class_dev.class = &video_class; 324 vfd->class_dev.class = &video_class;
325 vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); 325 vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
326 if (vfd->dev) 326 if (vfd->parent)
327 vfd->class_dev.parent = vfd->dev; 327 vfd->class_dev.parent = vfd->parent;
328 sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); 328 sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base);
329 ret = device_register(&vfd->class_dev); 329 ret = device_register(&vfd->class_dev);
330 if (ret < 0) { 330 if (ret < 0) {
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c
index 840522442d07..3f5a59dc5f8f 100644
--- a/drivers/media/video/w9968cf.c
+++ b/drivers/media/video/w9968cf.c
@@ -3555,7 +3555,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
3555 cam->v4ldev->minor = video_nr[dev_nr]; 3555 cam->v4ldev->minor = video_nr[dev_nr];
3556 cam->v4ldev->release = video_device_release; 3556 cam->v4ldev->release = video_device_release;
3557 video_set_drvdata(cam->v4ldev, cam); 3557 video_set_drvdata(cam->v4ldev, cam);
3558 cam->v4ldev->dev = &cam->dev; 3558 cam->v4ldev->parent = &cam->dev;
3559 3559
3560 err = video_register_device(cam->v4ldev, VFL_TYPE_GRABBER, 3560 err = video_register_device(cam->v4ldev, VFL_TYPE_GRABBER,
3561 video_nr[dev_nr]); 3561 video_nr[dev_nr]);