Hi Sebastian,

Thank you for the review!

Sebastian Reichel wrote:

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 
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.

I first thought I'd say it makes it cleaner what's optional and what's not. The same is however visible some ten--twenty lines above this code, so not really an argument for that. Will fix.

+       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

Sakari Ailus
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

Reply via email to