On Wed, 20 May 2015, William Towle wrote: > 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> Author? > --- > 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; Wouldn't it be easier to: + adv7180_mbus_fmt(sd, &format->format); framefmt = v4l2_subdev_get_try_format(sd, cfg, 0); *framefmt = format->format; and also make adv7180_mbus_fmt() return void? Thanks Guennadi > } > - > - 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