diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-02-15 17:18:39 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-04-12 09:46:07 +0200 |
commit | e18a7e9a2d34a32482e4069fcedf30a7bc9e9ef5 (patch) | |
tree | 8df9e432aa2fd7f6c9e45b9700610a0a8262b8ab /drivers/staging/media/deprecated | |
parent | e3a69496a1cde364c74a600d7a370179b58aed29 (diff) | |
download | linux-stable-e18a7e9a2d34a32482e4069fcedf30a7bc9e9ef5.tar.gz linux-stable-e18a7e9a2d34a32482e4069fcedf30a7bc9e9ef5.tar.bz2 linux-stable-e18a7e9a2d34a32482e4069fcedf30a7bc9e9ef5.zip |
media: Use designated initializers for all subdev pad ops
Structures passed to subdev pad operations are all zero-initialized when
declaring variables. In most cases, this is done with designated
initializers to initialize some of the fields to specific values, but in
a minority of cases the structures are zero-initialized by assigning
them to '{ 0 }' or '{ }'.
Improve coding style consistency by using designated initializers where
possible, always initializing the 'which' field.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/staging/media/deprecated')
-rw-r--r-- | drivers/staging/media/deprecated/atmel/atmel-isc-base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c index 0d48ae1bd71a..61c5afa58142 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c +++ b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c @@ -824,8 +824,10 @@ static int isc_try_configure_pipeline(struct isc_device *isc) static void isc_try_fse(struct isc_device *isc, struct v4l2_subdev_state *sd_state) { + struct v4l2_subdev_frame_size_enum fse = { + .which = V4L2_SUBDEV_FORMAT_TRY, + }; int ret; - struct v4l2_subdev_frame_size_enum fse = {}; /* * If we do not know yet which format the subdev is using, we cannot @@ -835,7 +837,6 @@ static void isc_try_fse(struct isc_device *isc, return; fse.code = isc->try_config.sd_format->mbus_code; - fse.which = V4L2_SUBDEV_FORMAT_TRY; ret = v4l2_subdev_call(isc->current_subdev->sd, pad, enum_frame_size, sd_state, &fse); |