linux-stable/drivers/media/usb
Laurent Pinchart 83c42283bf media: Prefer designated initializers over memset for subdev pad ops
[ Upstream commit e3a69496a1 ]

Structures passed to subdev pad operations are all zero-initialized, but
not always with the same kind of code constructs. While most drivers
used designated initializers, which zero all the fields that are not
specified, when declaring variables, some use memset(). Those two
methods lead to the same end result, and, depending on compiler
optimizations, may even be completely equivalent, but they're not
consistent.

Improve coding style consistency by using designated initializers
instead of calling memset(). Where applicable, also move the variables
to inner scopes of for loops to ensure correct initialization in all
iterations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com> # For am437x
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>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:32:36 +01:00
..
airspy media: airspy: fix memory leak in airspy probe 2022-08-30 07:31:42 +02:00
as102
au0828 media: mc: convert pipeline funcs to take media_pad 2022-09-24 09:22:30 +02:00
b2c2 media: flexcop-usb: use usb_endpoint_maxp() 2022-09-26 10:59:25 +02:00
cx231xx media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
dvb-usb media: Prefer designated initializers over memset for subdev pad ops 2023-05-24 17:32:36 +01:00
dvb-usb-v2 media: usb/dvb-usb-v2: fix repeated words in comments 2022-09-24 08:47:01 +02:00
em28xx media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
go7007 i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
gspca media: gspca: Fix typo 'the the' in comment 2022-08-29 15:32:14 +02:00
hackrf media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
hdpvr media: hdpvr: fix error value returns in hdpvr_read 2022-06-27 09:02:50 +01:00
msi2500 media: usb/msi2500: fix repeated words in comments 2022-09-24 08:46:38 +02:00
pvrusb2 media: pvrusb2: VIDEO_PVRUSB2 depends on DVB_CORE to use dvb_* symbols 2023-05-24 17:32:35 +01:00
pwc media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
s2255 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
siano media: usb: siano: Fix use after free bugs caused by do_submit_urb 2023-03-10 09:33:44 +01:00
stk1160 media: stk1160: use dma_alloc_noncontiguous API 2022-03-07 11:01:22 +01:00
ttusb-budget
ttusb-dec media: ttusb-dec: avoid release of non-acquired mutex 2021-09-30 10:07:40 +02:00
usbtv media: usbtv: Add PAL-Nc standard 2022-06-20 10:30:30 +01:00
uvc media: uvcvideo: Fix race condition with usb_kill_urb 2023-03-11 13:55:43 +01:00
Kconfig media: tm6000: deprecate this driver 2022-08-29 16:43:00 +02:00
Makefile media: tm6000: deprecate this driver 2022-08-29 16:43:00 +02:00