summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2014-09-16 18:57:07 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-28 15:32:46 (GMT)
commitf85698cd296f08218a7750f321e94607da128600 (patch)
tree73924ccf07d5f2e5354c4a2b44c0b3b0bdfd034b
parentd6d41ba1cb38d3e9575462b12f22b9f0b360bc1d (diff)
downloadlinux-f85698cd296f08218a7750f321e94607da128600.tar.xz
[media] smiapp: Take mutex during PLL update in sensor initialisation
The mutex does not serialise anything in this case but avoids a lockdep warning from the control framework. Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 932ed9b..6174a59 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2677,7 +2677,9 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
pll->flags |= SMIAPP_PLL_FLAG_NO_OP_CLOCKS;
pll->scale_n = sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN];
+ mutex_lock(&sensor->mutex);
rval = smiapp_update_mode(sensor);
+ mutex_unlock(&sensor->mutex);
if (rval) {
dev_err(&client->dev, "update mode failed\n");
goto out_nvm_release;