linux-stable/drivers/media
Arnd Bergmann b96b9635df media: mtk_jpeg_core: avoid unused-variable warning
[ Upstream commit 20de9fdaf4 ]

The mtk8195_jpegenc_drvdata object was added outside of an #ifdef causing
a harmless build warning.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c:1879:32: error: 'mtk8195_jpegenc_drvdata' defined but not used [-Werror=unused-variable]
 1879 | static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~

A follow-up patch moved it inside of an #ifdef, which caused more
warnings, and a third patch ended up adding even more #ifdefs. These
were all bogus, since the actual problem here is the incorrect use
of of_ptr(). Since the driver (like any other modern platform driver)
only works in combination with CONFIG_OF, there is no point in hiding
the reference, so just remove that along with all the pointless #ifdef
checks in the driver.

This improves build coverage and avoids running into the same problem
again when another part of the driver gets changed that relies on
the #ifdef blocks to be completely matched.

Fixes: 934e8bccac ("mtk-jpegenc: support jpegenc multi-hardware")
Fixes: 4ae47770d5 ("media: mtk-jpegenc: Fix a compilation issue")
Fixes: da4ede4b7f ("media: mtk-jpeg: move data/code inside CONFIG_OF blocks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-03 10:25:49 +02:00
..
cec media: cec: i2c: ch7322: also select REGMAP 2023-07-19 16:36:41 +02:00
common media: common: saa7146: Avoid a leak in vmalloc_to_sg() 2023-07-19 16:36:28 +02:00
dvb-core Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" 2023-06-14 23:16:29 +01:00
dvb-frontends media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table 2023-05-14 06:30:16 +01:00
firewire
i2c media: tc358746: Address compiler warnings 2023-08-03 10:25:48 +02:00
mc media: mc-device: remove unnecessary __must_check 2023-04-11 18:54:01 +02:00
mmc
pci media: netup_unidvb: fix irq init by register it at the end of probe 2023-05-14 06:30:13 +01:00
platform media: mtk_jpeg_core: avoid unused-variable warning 2023-08-03 10:25:49 +02:00
radio USB / Thunderbolt changes for 6.4-rc1 2023-04-27 11:42:11 -07:00
rc Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
spi
test-drivers media: Zero-initialize all structures passed to subdev pad operations 2023-04-12 09:46:06 +02:00
tuners media: it913x: Convert to platform remove callback returning void 2023-04-11 16:59:21 +02:00
usb media: usb: siano: Fix warning due to null work_func_t function pointer 2023-07-19 16:36:28 +02:00
v4l2-core media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad() 2023-06-02 18:45:24 +01:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile