diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-28 14:51:04 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-12 18:21:34 +0100 |
commit | cf73a660111c98f20cedb4abad7b46718c182333 (patch) | |
tree | 2af5bda15c77b4931a90860764725cc185123445 /drivers/media/platform/davinci/vpif.c | |
parent | media: em28xx: Fix use-after-free in em28xx_alloc_urbs (diff) | |
download | linux-cf73a660111c98f20cedb4abad7b46718c182333.tar.xz linux-cf73a660111c98f20cedb4abad7b46718c182333.zip |
media: platform: davinci: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/davinci/vpif.c')
-rw-r--r-- | drivers/media/platform/davinci/vpif.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c index 5e67994e62cc..f1ce10828b8e 100644 --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c @@ -41,7 +41,7 @@ MODULE_ALIAS("platform:" VPIF_DRIVER_NAME); #define VPIF_CH2_MAX_MODES 15 #define VPIF_CH3_MAX_MODES 2 -spinlock_t vpif_lock; +DEFINE_SPINLOCK(vpif_lock); EXPORT_SYMBOL_GPL(vpif_lock); void __iomem *vpif_base; @@ -437,7 +437,6 @@ static int vpif_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_get(&pdev->dev); - spin_lock_init(&vpif_lock); dev_info(&pdev->dev, "vpif probe success\n"); /* |