From d51fdb016c7254c6bef59bca8ebf2e27f04d4d56 Mon Sep 17 00:00:00 2001 From: Leo Wen Date: Mon, 19 Nov 2018 15:50:33 +0800 Subject: [PATCH] media: i2c: Change the format to MEDIA_BUS_FMT_Y10_1X10 for the ov7251. Change-Id: I72e1f6d0169fd676f46899e36b7ff15ca0946c1a Signed-off-by: Leo Wen --- drivers/media/i2c/ov7251.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c index c4df90e3eba9..dc1a3275bb49 100644 --- a/drivers/media/i2c/ov7251.c +++ b/drivers/media/i2c/ov7251.c @@ -414,7 +414,7 @@ static int ov7251_set_fmt(struct v4l2_subdev *sd, mutex_lock(&ov7251->mutex); mode = ov7251_find_best_fit(fmt); - fmt->format.code = MEDIA_BUS_FMT_SBGGR10_1X10; + fmt->format.code = MEDIA_BUS_FMT_Y10_1X10; fmt->format.width = mode->width; fmt->format.height = mode->height; fmt->format.field = V4L2_FIELD_NONE; @@ -459,7 +459,7 @@ static int ov7251_get_fmt(struct v4l2_subdev *sd, } else { fmt->format.width = mode->width; fmt->format.height = mode->height; - fmt->format.code = MEDIA_BUS_FMT_SBGGR10_1X10; + fmt->format.code = MEDIA_BUS_FMT_Y10_1X10; fmt->format.field = V4L2_FIELD_NONE; } mutex_unlock(&ov7251->mutex); @@ -473,7 +473,7 @@ static int ov7251_enum_mbus_code(struct v4l2_subdev *sd, { if (code->index != 0) return -EINVAL; - code->code = MEDIA_BUS_FMT_SBGGR10_1X10; + code->code = MEDIA_BUS_FMT_Y10_1X10; return 0; } @@ -485,7 +485,7 @@ static int ov7251_enum_frame_sizes(struct v4l2_subdev *sd, if (fse->index >= ARRAY_SIZE(supported_modes)) return -EINVAL; - if (fse->code != MEDIA_BUS_FMT_SBGGR10_1X10) + if (fse->code != MEDIA_BUS_FMT_Y10_1X10) return -EINVAL; fse->min_width = supported_modes[fse->index].width; @@ -660,7 +660,7 @@ static int ov7251_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) /* Initialize try_fmt */ try_fmt->width = def_mode->width; try_fmt->height = def_mode->height; - try_fmt->code = MEDIA_BUS_FMT_SBGGR10_1X10; + try_fmt->code = MEDIA_BUS_FMT_Y10_1X10; try_fmt->field = V4L2_FIELD_NONE; mutex_unlock(&ov7251->mutex);