[09/13] media: soc_camera: soc_scale_crop: Use correct pad number in try_fmt

Message ID 1437654103-26409-10-git-send-email-william.towle@codethink.co.uk (mailing list archive)
State Superseded, archived
Delegated to: Hans Verkuil
Headers

Commit Message

William Towle July 23, 2015, 12:21 p.m. UTC
  From: Rob Taylor <rob.taylor@codethink.co.uk>

Fix calls to subdev try_fmt function to use valid pad numbers, fixing
the case where subdevs (eg. ADV7612) have valid pad numbers that are
non-zero.

Signed-off-by: William Towle <william.towle@codethink.co.uk>
Reviewed-by: Rob Taylor <rob.taylor@codethink.co.uk>
---
 drivers/media/platform/soc_camera/soc_scale_crop.c |    1 +
 1 file changed, 1 insertion(+)
  

Comments

Hans Verkuil July 24, 2015, 2:14 p.m. UTC | #1
On 07/23/2015 02:21 PM, William Towle wrote:
> From: Rob Taylor <rob.taylor@codethink.co.uk>
> 
> Fix calls to subdev try_fmt function to use valid pad numbers, fixing
> the case where subdevs (eg. ADV7612) have valid pad numbers that are
> non-zero.
> 
> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> Reviewed-by: Rob Taylor <rob.taylor@codethink.co.uk>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> ---
>  drivers/media/platform/soc_camera/soc_scale_crop.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c
> index bda29bc..2772215 100644
> --- a/drivers/media/platform/soc_camera/soc_scale_crop.c
> +++ b/drivers/media/platform/soc_camera/soc_scale_crop.c
> @@ -225,6 +225,7 @@ static int client_set_fmt(struct soc_camera_device *icd,
>  	bool host_1to1;
>  	int ret;
>  
> +	format->pad = icd->src_pad_idx;
>  	ret = v4l2_device_call_until_err(sd->v4l2_dev,
>  					 soc_camera_grp_id(icd), pad,
>  					 set_fmt, NULL, format);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c
index bda29bc..2772215 100644
--- a/drivers/media/platform/soc_camera/soc_scale_crop.c
+++ b/drivers/media/platform/soc_camera/soc_scale_crop.c
@@ -225,6 +225,7 @@  static int client_set_fmt(struct soc_camera_device *icd,
 	bool host_1to1;
 	int ret;
 
+	format->pad = icd->src_pad_idx;
 	ret = v4l2_device_call_until_err(sd->v4l2_dev,
 					 soc_camera_grp_id(icd), pad,
 					 set_fmt, NULL, format);