media: platform: davinci: Use DEFINE_SPINLOCK() for spinlock
authorZheng Yongjun <zhengyongjun3@huawei.com>
Mon, 28 Dec 2020 13:51:04 +0000 (14:51 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 Jan 2021 17:21:34 +0000 (18:21 +0100)
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>
drivers/media/platform/davinci/vpif.c

index 5e67994..f1ce108 100644 (file)
@@ -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");
 
        /*