media: jpeg-core: Remove redundant dev_err()There is no need to call the dev_err() function directly to print a custommessage when handling an error from platform_get_irq() function asit is going
media: jpeg-core: Remove redundant dev_err()There is no need to call the dev_err() function directly to print a custommessage when handling an error from platform_get_irq() function asit is going to display an appropriate error message in case of a failure.Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
media: platform: samsung: s5p-jpeg: drop of_match_ptr for ID tableThe driver can match only via the DT table so the table should be alwaysused and the of_match_ptr does not have any sense (this al
media: platform: samsung: s5p-jpeg: drop of_match_ptr for ID tableThe driver can match only via the DT table so the table should be alwaysused and the of_match_ptr does not have any sense (this also allows ACPImatching via PRP0001, even though it might not be relevant here). Thisalso fixes !CONFIG_OF error: drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c:3124:34: error: ‘samsung_jpeg_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: Add common header file with JPEG marker definitionsWhen compile-testing on mips/RB532 with W=1: arch/mips/include/asm/mach-rc32434/rb.h:13: note: this is the location of the previous de
media: Add common header file with JPEG marker definitionsWhen compile-testing on mips/RB532 with W=1: arch/mips/include/asm/mach-rc32434/rb.h:13: note: this is the location of the previous definition 13 | #define RST (1 << 15) | drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_parse.c:15: warning: "RST" redefined 15 | #define RST 0xd0 | drivers/media/platform/renesas/rcar_jpu.c:77: warning: "RST" redefined 77 | #define RST 0xd0 |"RST" is indeed a name too short to be conflict-free.Fix this by creating a common <media/jpeg.h> header file, containingdefinitions for all JPEG markers used, prefixed by "JPEG_MARKER_", basedon the existing private definitions in the Samsung S5P JPEG driver, andconvert all affected drivers.Reported-by: kernel test robot <lkp@intel.com>Link: https://lore.kernel.org/oe-kbuild-all/202304152346.hJOPxPRh-lkp@intel.com/Link: https://lore.kernel.org/oe-kbuild-all/202304150059.bHUyuriy-lkp@intel.com/Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> (s5p-jpeg)Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: jpeg-core: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do er
media: jpeg-core: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error handling byreturning an error code. However the value returned is (mostly) ignoredand this typically results in resource leaks. To improve here there is aquest to make the remove callback return void. In the first step of thisquest all drivers are converted to .remove_new() which already returnsvoid.Trivially convert this driver from always returning zero in the removecallback to the void returning variant.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: platform: samsung: s5p-jpeg: replace ternary operator with max()Fix the following coccicheck warning:drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c:1712:24-25:WARNING opportunity for
media: platform: samsung: s5p-jpeg: replace ternary operator with max()Fix the following coccicheck warning:drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c:1712:24-25:WARNING opportunity for max()max() macro is defined in include/linux/minmax.h. It avoids multipleevaluations of the arguments when non-constant and performs stricttype-checking.Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: platform: samsung: remove redundant assignment to variable mThe variable m is being assigned a value that is never read, itis being re-assigned in both paths of the following if-statement.
media: platform: samsung: remove redundant assignment to variable mThe variable m is being assigned a value that is never read, itis being re-assigned in both paths of the following if-statement.The assignment is redundant and can be removed.Signed-off-by: Colin Ian King <colin.i.king@gmail.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: v4l: ioctl: Set bus_info in v4l_querycap()The bus_info field is set by most drivers based on the type of the devicebus as well as the name of the device. Do this in v4l_querycap() sodriver
media: v4l: ioctl: Set bus_info in v4l_querycap()The bus_info field is set by most drivers based on the type of the devicebus as well as the name of the device. Do this in v4l_querycap() sodrivers don't need to. This keeps compatibility with non-default and sillybus_info.Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: Kconfig: cleanup VIDEO_DEV dependenciesmedia Kconfig has two entries associated to V4L API:VIDEO_DEV and VIDEO_V4L2.On Kernel 2.6.x, there were two V4L APIs, each one with its own flag.V
media: Kconfig: cleanup VIDEO_DEV dependenciesmedia Kconfig has two entries associated to V4L API:VIDEO_DEV and VIDEO_V4L2.On Kernel 2.6.x, there were two V4L APIs, each one with its own flag.VIDEO_DEV were meant to: 1) enable Video4Linux and make its Kconfig options to appear; 2) it makes the Kernel build the V4L core.while VIDEO_V4L2 where used to distinguish between drivers thatimplement the newer API and drivers that implemented the former one.With time, such meaning changed, specially after the removal ofall V4L version 1 drivers.At the current implementation, VIDEO_DEV only does (1): it enablesthe media options related to V4L, that now has: menu "Video4Linux options" visible if VIDEO_DEV source "drivers/media/v4l2-core/Kconfig" endmenubut it doesn't affect anymore the V4L core drivers.The rationale is that the V4L2 core has a "soft" dependencyat the I2C bus, and now requires to select a number of otherKconfig options: config VIDEO_V4L2 tristate depends on (I2C || I2C=n) && VIDEO_DEV select RATIONAL select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE default (I2C || I2C=n) && VIDEO_DEVIn the past, merging them would be tricky, but it seems that it is nowpossible to merge those symbols, in order to simplify V4L dependencies.Let's keep VIDEO_DEV, as this one is used on some make *defconfigconfigurations.Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for meson-vdec & meson-ge2dAcked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>Acked-by: Łukasz Stelmach <l.stelmach@samsung.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: platform: rename s5p-jpeg/ to samsung/s5p-jpeg/As the end goal is to have platform drivers split by vendor,rename s5p-jpeg/ to samsung/s5p-jpeg/.Acked-by: Andrzej Pietrasiewicz <andrzejtp
media: platform: rename s5p-jpeg/ to samsung/s5p-jpeg/As the end goal is to have platform drivers split by vendor,rename s5p-jpeg/ to samsung/s5p-jpeg/.Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>