All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rui Miguel Silva <rui.silva@linaro.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	devel@driverdev.osuosl.org,
	Sebastien Szymanski <sebastien.szymanski@armadeus.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] media: imx7-media-csi: get csi upstream endpoint
Date: Wed, 12 Jun 2019 10:43:20 +0300	[thread overview]
Message-ID: <20190612074319.GE1915@kadam> (raw)
In-Reply-To: <20190611150955.8038-1-rui.silva@linaro.org>

On Tue, Jun 11, 2019 at 04:09:55PM +0100, Rui Miguel Silva wrote:
> When the upstream endpoint is neither a mux nor a CSI2 module, just get
> the source pad directly upstream from the CSI.
> 
> Fixes: 05f634040c0d ("media: staging/imx7: add imx7 CSI subdev driver")
> Reported-by: Sebastien Szymanski <sebastien.szymanski@armadeus.com>
> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
> ---
>  drivers/staging/media/imx/imx7-media-csi.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
> index 9101566f3f67..8979ee0c8202 100644
> --- a/drivers/staging/media/imx/imx7-media-csi.c
> +++ b/drivers/staging/media/imx/imx7-media-csi.c
> @@ -442,6 +442,14 @@ static int imx7_csi_get_upstream_endpoint(struct imx7_csi *csi,
>  
>  	src = &csi->src_sd->entity;
>  
> +	/*
> +	 * if the source in neither a mux or csi2 get the one directly upstream
                         ^^
is?

> +	 * from this csi
> +	 */
> +	if (src->function != MEDIA_ENT_F_VID_IF_BRIDGE &&
> +		src->function != MEDIA_ENT_F_VID_MUX)
> +		src = &csi->sd.entity;

This would be easier to read if the white space were tweaked a little:

	if (src->function != MEDIA_ENT_F_VID_IF_BRIDGE &&
	    src->function != MEDIA_ENT_F_VID_MUX)
		src = &csi->sd.entity;

regards,
dan carpenter



  reply	other threads:[~2019-06-12  7:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 15:09 [PATCH] media: imx7-media-csi: get csi upstream endpoint Rui Miguel Silva
2019-06-12  7:43 ` Dan Carpenter [this message]
2019-06-12  9:50   ` Rui Miguel Silva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190612074319.GE1915@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=rui.silva@linaro.org \
    --cc=sebastien.szymanski@armadeus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.