aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp/smiapp-core.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2016-09-08 05:49:27 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-21 15:13:26 -0200
commit1b81717ed7be8a88345dde1e0cffcc31a7693d81 (patch)
treec48e7f12c6be6298eb5812e819b0615ecb9ead58 /drivers/media/i2c/smiapp/smiapp-core.c
parent2aa8e838a303c7c9ed4b2761eb8ffe0930320d24 (diff)
[media] smiapp: Obtain correct media bus code for try format
The media bus code obtained for try format may have been a code that the sensor did not even support. Use a supported code with the current pixel order. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/smiapp/smiapp-core.c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 2e8b7bf32c87..5f4680d9d822 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2623,8 +2623,6 @@ static int smiapp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{
struct smiapp_subdev *ssd = to_smiapp_subdev(sd);
struct smiapp_sensor *sensor = ssd->sensor;
- u32 mbus_code =
- smiapp_csi_data_formats[smiapp_pixel_order(sensor)].code;
unsigned int i;
mutex_lock(&sensor->mutex);
@@ -2640,7 +2638,7 @@ static int smiapp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
try_fmt->width = try_crop->width;
try_fmt->height = try_crop->height;
- try_fmt->code = mbus_code;
+ try_fmt->code = sensor->internal_csi_format->code;
try_fmt->field = V4L2_FIELD_NONE;
if (ssd != sensor->pixel_array)

Privacy Policy