Tegra VDE: Minor code clean up
Subsystems (3)
cover Tegra VDE: Minor code clean up
Hello,
This small series just makes a minor clean up of the driver's code, addressing COMPILE_TEST build problem that was reported sometime ago.
Dmitry Osipenko (3):
media: staging: tegra-vde: Select IOVA unconditionally in Kconfig
media: staging: tegra-vde: Sort headers alphabetically
media: staging: tegra-vde: Use __maybe_unused attribute instead of
ifdef
drivers/staging/media/tegra-vde/Kconfig | 2 +- drivers/staging/media/tegra-vde/vde.c | 6 ++---- drivers/staging/media/tegra-vde/vde.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-)
Signature · 1 line
2.24.0
PATCH 1/3 media: staging: tegra-vde: Select IOVA unconditionally in Kconfig
There were several reports of building failures due to IOVA being selected inconsistently by different drivers. All drivers that are using IOVA API should select it unconditionally in order to avoid the compilation problems, tegra-vde is one of those drivers.
--- drivers/staging/media/tegra-vde/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/tegra-vde/Kconfig +1 -1
@@ -3,7 +3,7 @@ config TEGRA_VDE tristate "NVIDIA Tegra Video Decoder Engine driver" depends on ARCH_TEGRA || COMPILE_TEST select DMA_SHARED_BUFFER - select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST) + select IOMMU_IOVA select SRAM help Say Y here to enable support for the NVIDIA Tegra video decoder
Signature · 1 line
2.24.0
PATCH 2/3 media: staging: tegra-vde: Sort headers alphabetically
In reply to Dmitry OsipenkoKeep the alphabetical order for consistency.
--- drivers/staging/media/tegra-vde/vde.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/tegra-vde/vde.h +1 -1
@@ -10,11 +10,11 @@#include <linux/completion.h> #include <linux/dma-direction.h> +#include <linux/iova.h> #include <linux/list.h> #include <linux/miscdevice.h> #include <linux/mutex.h> #include <linux/types.h> -#include <linux/iova.h> struct clk ;struct dma_buf ;
Signature · 1 line
2.24.0
PATCH 3/3 media: staging: tegra-vde: Use __maybe_unused attribute instead of ifdef
In reply to Dmitry OsipenkoReplace #ifdef with __maybe_unused attribute just to keep code cleaner a tad.
--- drivers/staging/media/tegra-vde/vde.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/media/tegra-vde/vde.c +2 -4
@@ -1150,8 +1150,7 @@ static int tegra_vde_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP -static int tegra_vde_pm_suspend (struct device *dev) +static __maybe_unused int tegra_vde_pm_suspend (struct device *dev) {struct tegra_vde *vde =dev_get_drvdata (dev);int err;
@@ -1165,7 +1164,7 @@ static int tegra_vde_pm_suspend(struct device *dev)return 0 ; } -static int tegra_vde_pm_resume (struct device *dev) +static __maybe_unused int tegra_vde_pm_resume (struct device *dev) {struct tegra_vde *vde =dev_get_drvdata (dev);int err;
@@ -1178,7 +1177,6 @@ static int tegra_vde_pm_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops tegra_vde_pm_ops = { SET_RUNTIME_PM_OPS(tegra_vde_runtime_suspend,
Signature · 1 line
2.24.0