Re: [PATCH v2 01/17] smiapp: Move sub-device initialisation into a separate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

Thank you for the review!

Sebastian Reichel wrote:
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 <sre@xxxxxxxxxx>

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
  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.

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
sakari.ailus@xxxxxxxxxxxxxxx
--
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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux