Re: [PATCH v2 03/17] smiapp: Initialise media entity after sensor init

2016-09-19 Thread Sebastian Reichel
Hi,

On Thu, Sep 15, 2016 at 02:22:17PM +0300, Sakari Ailus wrote:
> This allows determining the number of pads in the entity based on the
> sensor.
> 
> Signed-off-by: Sakari Ailus 
> ---
>  drivers/media/i2c/smiapp/smiapp-core.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
> b/drivers/media/i2c/smiapp/smiapp-core.c
> index be74ba3..0a03f30 100644
> --- a/drivers/media/i2c/smiapp/smiapp-core.c
> +++ b/drivers/media/i2c/smiapp/smiapp-core.c
> @@ -3056,12 +3056,7 @@ static int smiapp_probe(struct i2c_client *client,
>   sensor->src->sd.internal_ops = &smiapp_internal_src_ops;
>   sensor->src->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>   sensor->src->sensor = sensor;
> -
>   sensor->src->pads[0].flags = MEDIA_PAD_FL_SOURCE;
> - rval = media_entity_pads_init(&sensor->src->sd.entity, 2,
> -  sensor->src->pads);
> - if (rval < 0)
> - return rval;
>  
>   if (client->dev.of_node) {
>   rval = smiapp_init(sensor);
> @@ -3069,6 +3064,11 @@ static int smiapp_probe(struct i2c_client *client,
>   goto out_media_entity_cleanup;
>   }
>  
> + rval = media_entity_pads_init(&sensor->src->sd.entity, 2,
> +  sensor->src->pads);
> + if (rval < 0)
> + goto out_media_entity_cleanup;
> +
>   rval = v4l2_async_register_subdev(&sensor->src->sd);
>   if (rval < 0)
>   goto out_media_entity_cleanup;

As far as I can see this is not strictly needed, but:

Reviewed-By: Sebastian Reichel 

-- Sebastian


signature.asc
Description: PGP signature


[PATCH v2 03/17] smiapp: Initialise media entity after sensor init

2016-09-15 Thread Sakari Ailus
This allows determining the number of pads in the entity based on the
sensor.

Signed-off-by: Sakari Ailus 
---
 drivers/media/i2c/smiapp/smiapp-core.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
b/drivers/media/i2c/smiapp/smiapp-core.c
index be74ba3..0a03f30 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -3056,12 +3056,7 @@ static int smiapp_probe(struct i2c_client *client,
sensor->src->sd.internal_ops = &smiapp_internal_src_ops;
sensor->src->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sensor->src->sensor = sensor;
-
sensor->src->pads[0].flags = MEDIA_PAD_FL_SOURCE;
-   rval = media_entity_pads_init(&sensor->src->sd.entity, 2,
-sensor->src->pads);
-   if (rval < 0)
-   return rval;
 
if (client->dev.of_node) {
rval = smiapp_init(sensor);
@@ -3069,6 +3064,11 @@ static int smiapp_probe(struct i2c_client *client,
goto out_media_entity_cleanup;
}
 
+   rval = media_entity_pads_init(&sensor->src->sd.entity, 2,
+sensor->src->pads);
+   if (rval < 0)
+   goto out_media_entity_cleanup;
+
rval = v4l2_async_register_subdev(&sensor->src->sd);
if (rval < 0)
goto out_media_entity_cleanup;
-- 
2.1.4

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