Hi,

On Thu, Sep 15, 2016 at 02:22:15PM +0300, Sakari Ailus wrote:
> Simplify smiapp_init() by moving the initialisation of individual
> sub-devices to a separate function.

Reviewed-By: Sebastian Reichel <s...@kernel.org>

> Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com>
> ---
>  drivers/media/i2c/smiapp/smiapp-core.c | 108 
> +++++++++++++++------------------
>  1 file changed, 49 insertions(+), 59 deletions(-)
> 
> diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
> b/drivers/media/i2c/smiapp/smiapp-core.c
> index 44f8c7e..862017e 100644
> --- a/drivers/media/i2c/smiapp/smiapp-core.c
> +++ b/drivers/media/i2c/smiapp/smiapp-core.c
>
> [...]
>
> +     if (sensor->scaler)
> +             smiapp_create_subdev(sensor, sensor->scaler, "scaler");

I would add the NULL check to smiapp_create_subdev.

> +     smiapp_create_subdev(sensor, sensor->binner, "binner");
> +     smiapp_create_subdev(sensor, sensor->pixel_array, "pixel_array");
>  
>       dev_dbg(&client->dev, "profile %d\n", sensor->minfo.smiapp_profile);
> 

-- Sebastian

Attachment: signature.asc
Description: PGP signature

Reply via email to