summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ov5648.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/i2c/ov5648.c')
-rw-r--r--drivers/media/i2c/ov5648.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index 947d437ed0ef..ef8b52dc9401 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -639,7 +639,7 @@ struct ov5648_ctrls {
struct v4l2_ctrl *pixel_rate;
struct v4l2_ctrl_handler handler;
-} __packed;
+};
struct ov5648_sensor {
struct device *dev;
@@ -1778,8 +1778,14 @@ static int ov5648_state_configure(struct ov5648_sensor *sensor,
static int ov5648_state_init(struct ov5648_sensor *sensor)
{
- return ov5648_state_configure(sensor, &ov5648_modes[0],
- ov5648_mbus_codes[0]);
+ int ret;
+
+ mutex_lock(&sensor->mutex);
+ ret = ov5648_state_configure(sensor, &ov5648_modes[0],
+ ov5648_mbus_codes[0]);
+ mutex_unlock(&sensor->mutex);
+
+ return ret;
}
/* Sensor Base */