aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp/smiapp-core.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2014-04-15 13:59:42 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 10:29:56 -0400
commite5a3f7b88295fbf221d4c371f361e40dfc735b50 (patch)
tree9769c8841b6d04550ab996fd4431c11e36bad96f /drivers/media/i2c/smiapp/smiapp-core.c
parent48cb4a5d2462e89d39db48a03189bb201810dd72 (diff)
[media] smiapp: Call limits quirk immediately after retrieving the limits
Some of the limits are used before the limits quirk is called. Move the call immediately after obtaining the limits. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c/smiapp/smiapp-core.c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index da4422e8cbb4..0a74e145e1d2 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2423,6 +2423,12 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
2423 sensor->hvflip_inv_mask = SMIAPP_IMAGE_ORIENTATION_HFLIP | 2423 sensor->hvflip_inv_mask = SMIAPP_IMAGE_ORIENTATION_HFLIP |
2424 SMIAPP_IMAGE_ORIENTATION_VFLIP; 2424 SMIAPP_IMAGE_ORIENTATION_VFLIP;
2425 2425
2426 rval = smiapp_call_quirk(sensor, limits);
2427 if (rval) {
2428 dev_err(&client->dev, "limits quirks failed\n");
2429 goto out_power_off;
2430 }
2431
2426 rval = smiapp_get_mbus_formats(sensor); 2432 rval = smiapp_get_mbus_formats(sensor);
2427 if (rval) { 2433 if (rval) {
2428 rval = -ENODEV; 2434 rval = -ENODEV;
@@ -2483,12 +2489,6 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
2483 } 2489 }
2484 } 2490 }
2485 2491
2486 rval = smiapp_call_quirk(sensor, limits);
2487 if (rval) {
2488 dev_err(&client->dev, "limits quirks failed\n");
2489 goto out_nvm_release;
2490 }
2491
2492 /* We consider this as profile 0 sensor if any of these are zero. */ 2492 /* We consider this as profile 0 sensor if any of these are zero. */
2493 if (!sensor->limits[SMIAPP_LIMIT_MIN_OP_SYS_CLK_DIV] || 2493 if (!sensor->limits[SMIAPP_LIMIT_MIN_OP_SYS_CLK_DIV] ||
2494 !sensor->limits[SMIAPP_LIMIT_MAX_OP_SYS_CLK_DIV] || 2494 !sensor->limits[SMIAPP_LIMIT_MAX_OP_SYS_CLK_DIV] ||