aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cafe_ccic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r--drivers/media/video/cafe_ccic.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 1740b9ebdcef..34a39d2e4703 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -859,7 +859,7 @@ static int __cafe_cam_reset(struct cafe_camera *cam)
859 */ 859 */
860static int cafe_cam_init(struct cafe_camera *cam) 860static int cafe_cam_init(struct cafe_camera *cam)
861{ 861{
862 struct v4l2_chip_ident chip = { V4L2_CHIP_MATCH_I2C_ADDR, 0, 0, 0 }; 862 struct v4l2_dbg_chip_ident chip;
863 int ret; 863 int ret;
864 864
865 mutex_lock(&cam->s_mutex); 865 mutex_lock(&cam->s_mutex);
@@ -869,8 +869,9 @@ static int cafe_cam_init(struct cafe_camera *cam)
869 ret = __cafe_cam_reset(cam); 869 ret = __cafe_cam_reset(cam);
870 if (ret) 870 if (ret)
871 goto out; 871 goto out;
872 chip.match_chip = cam->sensor->addr; 872 chip.match.type = V4L2_CHIP_MATCH_I2C_ADDR;
873 ret = __cafe_cam_cmd(cam, VIDIOC_G_CHIP_IDENT, &chip); 873 chip.match.addr = cam->sensor->addr;
874 ret = __cafe_cam_cmd(cam, VIDIOC_DBG_G_CHIP_IDENT, &chip);
874 if (ret) 875 if (ret)
875 goto out; 876 goto out;
876 cam->sensor_type = chip.ident; 877 cam->sensor_type = chip.ident;
@@ -1472,11 +1473,11 @@ static int cafe_v4l_mmap(struct file *filp, struct vm_area_struct *vma)
1472 1473
1473 1474
1474 1475
1475static int cafe_v4l_open(struct inode *inode, struct file *filp) 1476static int cafe_v4l_open(struct file *filp)
1476{ 1477{
1477 struct cafe_camera *cam; 1478 struct cafe_camera *cam;
1478 1479
1479 cam = cafe_find_dev(iminor(inode)); 1480 cam = cafe_find_dev(video_devdata(filp)->minor);
1480 if (cam == NULL) 1481 if (cam == NULL)
1481 return -ENODEV; 1482 return -ENODEV;
1482 filp->private_data = cam; 1483 filp->private_data = cam;
@@ -1494,7 +1495,7 @@ static int cafe_v4l_open(struct inode *inode, struct file *filp)
1494} 1495}
1495 1496
1496 1497
1497static int cafe_v4l_release(struct inode *inode, struct file *filp) 1498static int cafe_v4l_release(struct file *filp)
1498{ 1499{
1499 struct cafe_camera *cam = filp->private_data; 1500 struct cafe_camera *cam = filp->private_data;
1500 1501
@@ -1759,7 +1760,7 @@ static void cafe_v4l_dev_release(struct video_device *vd)
1759 * clone it for specific real devices. 1760 * clone it for specific real devices.
1760 */ 1761 */
1761 1762
1762static const struct file_operations cafe_v4l_fops = { 1763static const struct v4l2_file_operations cafe_v4l_fops = {
1763 .owner = THIS_MODULE, 1764 .owner = THIS_MODULE,
1764 .open = cafe_v4l_open, 1765 .open = cafe_v4l_open,
1765 .release = cafe_v4l_release, 1766 .release = cafe_v4l_release,
@@ -1767,7 +1768,6 @@ static const struct file_operations cafe_v4l_fops = {
1767 .poll = cafe_v4l_poll, 1768 .poll = cafe_v4l_poll,
1768 .mmap = cafe_v4l_mmap, 1769 .mmap = cafe_v4l_mmap,
1769 .ioctl = video_ioctl2, 1770 .ioctl = video_ioctl2,
1770 .llseek = no_llseek,
1771}; 1771};
1772 1772
1773static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = { 1773static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = {