This is an automatic generated email to let you know that the following patch 
were queued:

Subject: [media] media: adv7180: fill in mbus format in set_fmt
Author:  Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se>
Date:    Fri Sep 2 13:44:56 2016 -0300

If the V4L2_SUBDEV_FORMAT_TRY is used in set_fmt the width, height etc
would not be filled.

Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>

 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 a6ac78bef4f6..cbed2bc29325 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -711,6 +711,7 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
 {
        struct adv7180_state *state = to_state(sd);
        struct v4l2_mbus_framefmt *framefmt;
+       int ret;
 
        switch (format->format.field) {
        case V4L2_FIELD_NONE:
@@ -722,8 +723,9 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
                break;
        }
 
+       ret = adv7180_mbus_fmt(sd,  &format->format);
+
        if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
-               framefmt = &format->format;
                if (state->field != format->format.field) {
                        state->field = format->format.field;
                        adv7180_set_power(state, false);
@@ -735,7 +737,7 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
                *framefmt = format->format;
        }
 
-       return adv7180_mbus_fmt(sd, framefmt);
+       return ret;
 }
 
 static int adv7180_g_mbus_config(struct v4l2_subdev *sd,

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to