Commit a1e25987 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Hans Verkuil

media: Fix indentation issues introduced by subdev-wide state struct

Commit 0d346d2a ("media: v4l2-subdev: add subdev-wide state struct")
applied a large media tree-wide change produced by coccinelle. It was so
large that a set of identical indentation issues went unnoticed during
review. Fix them.

While at it, and because it's easy to review both changes together, add
a trailing comma for the last (and only) struct member initialization of
the related structures, to avoid future changes should new fields need
to be initialized.

Fixes: 0d346d2a ("media: v4l2-subdev: add subdev-wide state struct")
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent a47a3ae5
...@@ -139,7 +139,7 @@ static int empress_try_fmt_vid_cap(struct file *file, void *priv, ...@@ -139,7 +139,7 @@ static int empress_try_fmt_vid_cap(struct file *file, void *priv,
struct saa7134_dev *dev = video_drvdata(file); struct saa7134_dev *dev = video_drvdata(file);
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
...@@ -587,7 +587,7 @@ static int isi_try_fmt(struct atmel_isi *isi, struct v4l2_format *f, ...@@ -587,7 +587,7 @@ static int isi_try_fmt(struct atmel_isi *isi, struct v4l2_format *f,
struct v4l2_pix_format *pixfmt = &f->fmt.pix; struct v4l2_pix_format *pixfmt = &f->fmt.pix;
struct v4l2_subdev_pad_config pad_cfg = {}; struct v4l2_subdev_pad_config pad_cfg = {};
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
...@@ -1794,7 +1794,7 @@ static int pxac_vidioc_try_fmt_vid_cap(struct file *filp, void *priv, ...@@ -1794,7 +1794,7 @@ static int pxac_vidioc_try_fmt_vid_cap(struct file *filp, void *priv,
struct v4l2_pix_format *pix = &f->fmt.pix; struct v4l2_pix_format *pix = &f->fmt.pix;
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
...@@ -1351,7 +1351,7 @@ static int mcam_vidioc_try_fmt_vid_cap(struct file *filp, void *priv, ...@@ -1351,7 +1351,7 @@ static int mcam_vidioc_try_fmt_vid_cap(struct file *filp, void *priv,
struct v4l2_pix_format *pix = &fmt->fmt.pix; struct v4l2_pix_format *pix = &fmt->fmt.pix;
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
...@@ -795,7 +795,7 @@ static int __ceu_try_fmt(struct ceu_device *ceudev, struct v4l2_format *v4l2_fmt ...@@ -795,7 +795,7 @@ static int __ceu_try_fmt(struct ceu_device *ceudev, struct v4l2_format *v4l2_fmt
struct v4l2_subdev *v4l2_sd = ceu_sd->v4l2_sd; struct v4l2_subdev *v4l2_sd = ceu_sd->v4l2_sd;
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
const struct ceu_fmt *ceu_fmt; const struct ceu_fmt *ceu_fmt;
u32 mbus_code_old; u32 mbus_code_old;
......
...@@ -123,7 +123,7 @@ rkisp1_rsz_get_pad_fmt(struct rkisp1_resizer *rsz, ...@@ -123,7 +123,7 @@ rkisp1_rsz_get_pad_fmt(struct rkisp1_resizer *rsz,
unsigned int pad, u32 which) unsigned int pad, u32 which)
{ {
struct v4l2_subdev_state state = { struct v4l2_subdev_state state = {
.pads = rsz->pad_cfg .pads = rsz->pad_cfg,
}; };
if (which == V4L2_SUBDEV_FORMAT_TRY) if (which == V4L2_SUBDEV_FORMAT_TRY)
return v4l2_subdev_get_try_format(&rsz->sd, sd_state, pad); return v4l2_subdev_get_try_format(&rsz->sd, sd_state, pad);
...@@ -137,7 +137,7 @@ rkisp1_rsz_get_pad_crop(struct rkisp1_resizer *rsz, ...@@ -137,7 +137,7 @@ rkisp1_rsz_get_pad_crop(struct rkisp1_resizer *rsz,
unsigned int pad, u32 which) unsigned int pad, u32 which)
{ {
struct v4l2_subdev_state state = { struct v4l2_subdev_state state = {
.pads = rsz->pad_cfg .pads = rsz->pad_cfg,
}; };
if (which == V4L2_SUBDEV_FORMAT_TRY) if (which == V4L2_SUBDEV_FORMAT_TRY)
return v4l2_subdev_get_try_crop(&rsz->sd, sd_state, pad); return v4l2_subdev_get_try_crop(&rsz->sd, sd_state, pad);
...@@ -733,7 +733,7 @@ static void rkisp1_rsz_unregister(struct rkisp1_resizer *rsz) ...@@ -733,7 +733,7 @@ static void rkisp1_rsz_unregister(struct rkisp1_resizer *rsz)
static int rkisp1_rsz_register(struct rkisp1_resizer *rsz) static int rkisp1_rsz_register(struct rkisp1_resizer *rsz)
{ {
struct v4l2_subdev_state state = { struct v4l2_subdev_state state = {
.pads = rsz->pad_cfg .pads = rsz->pad_cfg,
}; };
static const char * const dev_names[] = { static const char * const dev_names[] = {
RKISP1_RSZ_MP_DEV_NAME, RKISP1_RSZ_MP_DEV_NAME,
......
...@@ -845,7 +845,7 @@ static int viacam_do_try_fmt(struct via_camera *cam, ...@@ -845,7 +845,7 @@ static int viacam_do_try_fmt(struct via_camera *cam,
int ret; int ret;
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
...@@ -4254,7 +4254,7 @@ int atomisp_try_fmt(struct video_device *vdev, struct v4l2_pix_format *f, ...@@ -4254,7 +4254,7 @@ int atomisp_try_fmt(struct video_device *vdev, struct v4l2_pix_format *f,
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd; struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
...@@ -4882,7 +4882,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev, ...@@ -4882,7 +4882,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
const struct atomisp_format_bridge *format; const struct atomisp_format_bridge *format;
struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format vformat = { struct v4l2_subdev_format vformat = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
...@@ -860,7 +860,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f, ...@@ -860,7 +860,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f,
struct v4l2_pix_format *pixfmt = &f->fmt.pix; struct v4l2_pix_format *pixfmt = &f->fmt.pix;
struct v4l2_subdev_pad_config pad_cfg = {}; struct v4l2_subdev_pad_config pad_cfg = {};
struct v4l2_subdev_state pad_state = { struct v4l2_subdev_state pad_state = {
.pads = &pad_cfg .pads = &pad_cfg,
}; };
struct v4l2_subdev_format format = { struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY, .which = V4L2_SUBDEV_FORMAT_TRY,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment