diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2014-10-03 11:21:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-23 11:42:56 -0200 |
commit | 0691b40e88350cbfa686ca25f98ab614f1919d73 (patch) | |
tree | 6ba76b93479a7873cb30e23dae8d6b56273fd1bf /drivers/media/i2c | |
parent | 4c94468459884f10834b436620d2bd591c4cb105 (diff) | |
download | blackbird-op-linux-0691b40e88350cbfa686ca25f98ab614f1919d73.tar.gz blackbird-op-linux-0691b40e88350cbfa686ca25f98ab614f1919d73.zip |
[media] smiapp: Access flash capabilities through limits
The flash capability register is already read as part of the limit
registers. Do no access it separately; instead use the value from the
limits.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 9 | ||||
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp.h | 1 |
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 91ab71c3280e..22eddd6f92fc 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -1483,7 +1483,7 @@ static int smiapp_start_streaming(struct smiapp_sensor *sensor) if (rval < 0) goto out; - if ((sensor->flash_capability & + if ((sensor->limits[SMIAPP_LIMIT_FLASH_MODE_CAPABILITY] & (SMIAPP_FLASH_MODE_CAPABILITY_SINGLE_STROBE | SMIAPP_FLASH_MODE_CAPABILITY_MULTIPLE_STROBE)) && sensor->platform_data->strobe_setup != NULL && @@ -2529,7 +2529,6 @@ static int smiapp_init(struct smiapp_sensor *sensor) struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd); struct smiapp_pll *pll = &sensor->pll; struct smiapp_subdev *last = NULL; - u32 tmp; unsigned int i; int rval; @@ -2785,12 +2784,6 @@ static int smiapp_init(struct smiapp_sensor *sensor) sensor->streaming = false; sensor->dev_init_done = true; - /* check flash capability */ - rval = smiapp_read(sensor, SMIAPP_REG_U8_FLASH_MODE_CAPABILITY, &tmp); - sensor->flash_capability = tmp; - if (rval) - goto out_cleanup; - smiapp_power_off(sensor); return 0; diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index 8fded46ac584..ed010a8a49d7 100644 --- a/drivers/media/i2c/smiapp/smiapp.h +++ b/drivers/media/i2c/smiapp/smiapp.h @@ -216,7 +216,6 @@ struct smiapp_sensor { u8 scaling_mode; u8 hvflip_inv_mask; /* H/VFLIP inversion due to sensor orientation */ - u8 flash_capability; u8 frame_skip; int power_count; |