Hi Andrzej, On Fri, Nov 23, 2012 at 04:22:30PM +0100, Andrzej Hajda wrote: > Function support variable number of subdevs in pipe-line. > > Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx> > Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> > --- > drivers/media/platform/s5p-fimc/fimc-capture.c | 100 +++++++++++++++--------- > 1 file changed, 64 insertions(+), 36 deletions(-) > > diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c > index 3acbea3..39c4555 100644 > --- a/drivers/media/platform/s5p-fimc/fimc-capture.c > +++ b/drivers/media/platform/s5p-fimc/fimc-capture.c > @@ -794,6 +794,21 @@ static int fimc_cap_enum_fmt_mplane(struct file *file, void *priv, > return 0; > } > > +static struct media_entity *fimc_pipeline_get_head(struct media_entity *me) > +{ > + struct media_pad *pad = &me->pads[0]; > + > + while (!(pad->flags & MEDIA_PAD_FL_SOURCE)) { > + pad = media_entity_remote_source(pad); > + if (!pad) > + break; Isn't it an error if a sink pad of the entity isn't connected? media_entity_remote_source(pad) returns NULL if the link is disabled. I'm just wondering if this is possible. > + me = pad->entity; > + pad = &me->pads[0]; > + } > + > + return me; > +} > + -- Kind regards, Sakari Ailus e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html