From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] omap3isp: Find source pad from external entity
Date: Mon, 22 Oct 2012 12:56:30 +0200 [thread overview]
Message-ID: <1393695.KmiVKK1Qa1@avalon> (raw)
In-Reply-To: <1350769698-24752-2-git-send-email-sakari.ailus@iki.fi>
Hi Sakari,
Thanks for the patch.
On Sunday 21 October 2012 00:48:18 Sakari Ailus wrote:
> No longer assume pad number 0 is the source pad of the external entity. Find
> the source pad from the external entity and use it instead.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/platform/omap3isp/isp.c | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/platform/omap3isp/isp.c
> b/drivers/media/platform/omap3isp/isp.c index 5ea5520..5f75798 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -1767,6 +1767,7 @@ static int isp_register_entities(struct isp_device
> *isp) struct media_entity *input;
> unsigned int flags;
> unsigned int pad;
> + unsigned int i;
>
> sensor = isp_register_subdev_group(isp, subdevs->subdevs);
> if (sensor == NULL)
> @@ -1814,7 +1815,18 @@ static int isp_register_entities(struct isp_device
> *isp) goto done;
> }
>
> - ret = media_entity_create_link(&sensor->entity, 0, input, pad,
> + for (i = 0; i < sensor->entity.num_pads; i++) {
> + if (sensor->entity.pads[i].flags & MEDIA_PAD_FL_SOURCE)
> + break;
> + }
> + if (i == sensor->entity.num_pads) {
> + dev_err(isp->dev,
> + "no source pads in external entities\n");
Nitpicking, "no source pad in external entity". If that's fine with you I'll
modify this when applying this patch to my tree.
> + ret = -EINVAL;
> + goto done;
> + }
> +
> + ret = media_entity_create_link(&sensor->entity, i, input, pad,
> flags);
> if (ret < 0)
> goto done;
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2012-10-22 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-20 21:48 [PATCH 0/2] Old omap3isp improvements Sakari Ailus
2012-10-20 21:48 ` [PATCH 1/2] omap3isp: Add resizer data rate configuration to resizer_link_validate Sakari Ailus
2012-10-22 10:54 ` Laurent Pinchart
2012-10-20 21:48 ` [PATCH 2/2] omap3isp: Find source pad from external entity Sakari Ailus
2012-10-22 10:56 ` Laurent Pinchart [this message]
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=1393695.KmiVKK1Qa1@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).