diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2014-09-16 15:57:07 -0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-01-28 09:27:34 +0100 |
commit | 6b77d12ba98e4e0217131f0029ad298487338626 (patch) | |
tree | 915d01e743e497ad7f104133ec61edb913513731 | |
parent | ed1b779dd3e9844244b2a05426b11c3a7d273b03 (diff) | |
download | lwn-6b77d12ba98e4e0217131f0029ad298487338626.tar.gz lwn-6b77d12ba98e4e0217131f0029ad298487338626.zip |
smiapp: Take mutex during PLL update in sensor initialisation
commit f85698cd296f08218a7750f321e94607da128600 upstream.
The mutex does not serialise anything in this case but avoids a lockdep
warning from the control framework.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 2 |
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 371ca22843ee..4bfe83ffd577 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2625,7 +2625,9 @@ static int smiapp_registered(struct v4l2_subdev *subdev) pll->flags |= SMIAPP_PLL_FLAG_OP_PIX_CLOCK_PER_LANE; 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; |