diff options
Diffstat (limited to 'drivers/media/video/usbvideo')
-rw-r--r-- | drivers/media/video/usbvideo/vicam.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index d7728256f295..1ffcc393fcbb 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c | |||
@@ -473,8 +473,8 @@ static int | |||
473 | vicam_open(struct inode *inode, struct file *file) | 473 | vicam_open(struct inode *inode, struct file *file) |
474 | { | 474 | { |
475 | struct video_device *dev = video_devdata(file); | 475 | struct video_device *dev = video_devdata(file); |
476 | struct vicam_camera *cam = | 476 | struct vicam_camera *cam = video_get_drvdata(dev); |
477 | (struct vicam_camera *) dev->priv; | 477 | |
478 | DBG("open\n"); | 478 | DBG("open\n"); |
479 | 479 | ||
480 | if (!cam) { | 480 | if (!cam) { |
@@ -866,9 +866,8 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id) | |||
866 | 866 | ||
867 | mutex_init(&cam->cam_lock); | 867 | mutex_init(&cam->cam_lock); |
868 | 868 | ||
869 | memcpy(&cam->vdev, &vicam_template, | 869 | memcpy(&cam->vdev, &vicam_template, sizeof(vicam_template)); |
870 | sizeof (vicam_template)); | 870 | video_set_drvdata(&cam->vdev, cam); |
871 | cam->vdev.priv = cam; // sort of a reverse mapping for those functions that get vdev only | ||
872 | 871 | ||
873 | cam->udev = dev; | 872 | cam->udev = dev; |
874 | cam->bulkEndpoint = bulkEndpoint; | 873 | cam->bulkEndpoint = bulkEndpoint; |