diff options
Diffstat (limited to 'drivers/media/video/soc_camera.c')
-rw-r--r-- | drivers/media/video/soc_camera.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index d9ccc2866592..dd023bdb189e 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -152,9 +152,9 @@ static int soc_camera_s_std(struct file *file, void *priv, v4l2_std_id *a) | |||
152 | { | 152 | { |
153 | struct soc_camera_file *icf = file->private_data; | 153 | struct soc_camera_file *icf = file->private_data; |
154 | struct soc_camera_device *icd = icf->icd; | 154 | struct soc_camera_device *icd = icf->icd; |
155 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 155 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
156 | 156 | ||
157 | return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, s_std, *a); | 157 | return v4l2_subdev_call(sd, core, s_std, *a); |
158 | } | 158 | } |
159 | 159 | ||
160 | static int soc_camera_reqbufs(struct file *file, void *priv, | 160 | static int soc_camera_reqbufs(struct file *file, void *priv, |
@@ -589,7 +589,7 @@ static int soc_camera_streamon(struct file *file, void *priv, | |||
589 | { | 589 | { |
590 | struct soc_camera_file *icf = file->private_data; | 590 | struct soc_camera_file *icf = file->private_data; |
591 | struct soc_camera_device *icd = icf->icd; | 591 | struct soc_camera_device *icd = icf->icd; |
592 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 592 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
593 | int ret; | 593 | int ret; |
594 | 594 | ||
595 | WARN_ON(priv != file->private_data); | 595 | WARN_ON(priv != file->private_data); |
@@ -599,7 +599,7 @@ static int soc_camera_streamon(struct file *file, void *priv, | |||
599 | 599 | ||
600 | mutex_lock(&icd->video_lock); | 600 | mutex_lock(&icd->video_lock); |
601 | 601 | ||
602 | v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, video, s_stream, 1); | 602 | v4l2_subdev_call(sd, video, s_stream, 1); |
603 | 603 | ||
604 | /* This calls buf_queue from host driver's videobuf_queue_ops */ | 604 | /* This calls buf_queue from host driver's videobuf_queue_ops */ |
605 | ret = videobuf_streamon(&icf->vb_vidq); | 605 | ret = videobuf_streamon(&icf->vb_vidq); |
@@ -614,7 +614,7 @@ static int soc_camera_streamoff(struct file *file, void *priv, | |||
614 | { | 614 | { |
615 | struct soc_camera_file *icf = file->private_data; | 615 | struct soc_camera_file *icf = file->private_data; |
616 | struct soc_camera_device *icd = icf->icd; | 616 | struct soc_camera_device *icd = icf->icd; |
617 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 617 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
618 | 618 | ||
619 | WARN_ON(priv != file->private_data); | 619 | WARN_ON(priv != file->private_data); |
620 | 620 | ||
@@ -627,7 +627,7 @@ static int soc_camera_streamoff(struct file *file, void *priv, | |||
627 | * remaining buffers. When the last buffer is freed, stop capture */ | 627 | * remaining buffers. When the last buffer is freed, stop capture */ |
628 | videobuf_streamoff(&icf->vb_vidq); | 628 | videobuf_streamoff(&icf->vb_vidq); |
629 | 629 | ||
630 | v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, video, s_stream, 0); | 630 | v4l2_subdev_call(sd, video, s_stream, 0); |
631 | 631 | ||
632 | mutex_unlock(&icd->video_lock); | 632 | mutex_unlock(&icd->video_lock); |
633 | 633 | ||
@@ -672,6 +672,7 @@ static int soc_camera_g_ctrl(struct file *file, void *priv, | |||
672 | struct soc_camera_file *icf = file->private_data; | 672 | struct soc_camera_file *icf = file->private_data; |
673 | struct soc_camera_device *icd = icf->icd; | 673 | struct soc_camera_device *icd = icf->icd; |
674 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 674 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); |
675 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | ||
675 | int ret; | 676 | int ret; |
676 | 677 | ||
677 | WARN_ON(priv != file->private_data); | 678 | WARN_ON(priv != file->private_data); |
@@ -695,7 +696,7 @@ static int soc_camera_g_ctrl(struct file *file, void *priv, | |||
695 | return ret; | 696 | return ret; |
696 | } | 697 | } |
697 | 698 | ||
698 | return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, g_ctrl, ctrl); | 699 | return v4l2_subdev_call(sd, core, g_ctrl, ctrl); |
699 | } | 700 | } |
700 | 701 | ||
701 | static int soc_camera_s_ctrl(struct file *file, void *priv, | 702 | static int soc_camera_s_ctrl(struct file *file, void *priv, |
@@ -704,6 +705,7 @@ static int soc_camera_s_ctrl(struct file *file, void *priv, | |||
704 | struct soc_camera_file *icf = file->private_data; | 705 | struct soc_camera_file *icf = file->private_data; |
705 | struct soc_camera_device *icd = icf->icd; | 706 | struct soc_camera_device *icd = icf->icd; |
706 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 707 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); |
708 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | ||
707 | int ret; | 709 | int ret; |
708 | 710 | ||
709 | WARN_ON(priv != file->private_data); | 711 | WARN_ON(priv != file->private_data); |
@@ -714,7 +716,7 @@ static int soc_camera_s_ctrl(struct file *file, void *priv, | |||
714 | return ret; | 716 | return ret; |
715 | } | 717 | } |
716 | 718 | ||
717 | return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, s_ctrl, ctrl); | 719 | return v4l2_subdev_call(sd, core, s_ctrl, ctrl); |
718 | } | 720 | } |
719 | 721 | ||
720 | static int soc_camera_cropcap(struct file *file, void *fh, | 722 | static int soc_camera_cropcap(struct file *file, void *fh, |
@@ -812,9 +814,9 @@ static int soc_camera_g_chip_ident(struct file *file, void *fh, | |||
812 | { | 814 | { |
813 | struct soc_camera_file *icf = file->private_data; | 815 | struct soc_camera_file *icf = file->private_data; |
814 | struct soc_camera_device *icd = icf->icd; | 816 | struct soc_camera_device *icd = icf->icd; |
815 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 817 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
816 | 818 | ||
817 | return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, g_chip_ident, id); | 819 | return v4l2_subdev_call(sd, core, g_chip_ident, id); |
818 | } | 820 | } |
819 | 821 | ||
820 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 822 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
@@ -823,9 +825,9 @@ static int soc_camera_g_register(struct file *file, void *fh, | |||
823 | { | 825 | { |
824 | struct soc_camera_file *icf = file->private_data; | 826 | struct soc_camera_file *icf = file->private_data; |
825 | struct soc_camera_device *icd = icf->icd; | 827 | struct soc_camera_device *icd = icf->icd; |
826 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 828 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
827 | 829 | ||
828 | return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, g_register, reg); | 830 | return v4l2_subdev_call(sd, core, g_register, reg); |
829 | } | 831 | } |
830 | 832 | ||
831 | static int soc_camera_s_register(struct file *file, void *fh, | 833 | static int soc_camera_s_register(struct file *file, void *fh, |
@@ -833,9 +835,9 @@ static int soc_camera_s_register(struct file *file, void *fh, | |||
833 | { | 835 | { |
834 | struct soc_camera_file *icf = file->private_data; | 836 | struct soc_camera_file *icf = file->private_data; |
835 | struct soc_camera_device *icd = icf->icd; | 837 | struct soc_camera_device *icd = icf->icd; |
836 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 838 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
837 | 839 | ||
838 | return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, s_register, reg); | 840 | return v4l2_subdev_call(sd, core, s_register, reg); |
839 | } | 841 | } |
840 | #endif | 842 | #endif |
841 | 843 | ||