[PATCH 16/20] media: adv7180: Fix set_pad_format() passing wrong format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Return a usable format (and resolution) from adv7180_set_pad_format()
in the TRY_FORMAT case

Signed-off-by: Rob Taylor <rob.taylor@xxxxxxxxxxxxxxx>
Tested-by: William Towle <william.towle@xxxxxxxxxxxxxxx>
---
 drivers/media/i2c/adv7180.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 09a96df..ba0b92d5 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -686,12 +686,14 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
 			adv7180_set_field_mode(state);
 			adv7180_set_power(state, true);
 		}
+		adv7180_mbus_fmt(sd, framefmt);
 	} else {
 		framefmt = v4l2_subdev_get_try_format(sd, cfg, 0);
 		*framefmt = format->format;
+		adv7180_mbus_fmt(sd, framefmt);
+		format->format = *framefmt;
 	}
-
-	return adv7180_mbus_fmt(sd, framefmt);
+	return 0;
 }
 
 static int adv7180_g_mbus_config(struct v4l2_subdev *sd,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux