]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
ARM: OMAP2+: Use DEFINE_SPINLOCK() for spinlock
authorLifu Chen <chenlifu@huawei.com>
Sat, 27 Mar 2021 09:52:27 +0000 (17:52 +0800)
committerTony Lindgren <tony@atomide.com>
Wed, 31 Mar 2021 05:58:42 +0000 (08:58 +0300)
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lifu Chen <chenlifu@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/dma.c

index 1eb59003bdecdea32408afb842c800d94ca0d072..9f11de46aaa94e452264eb8ec31ceda6a025acc4 100644 (file)
@@ -85,7 +85,7 @@ static int dma_lch_count;
 static int dma_chan_count;
 static int omap_dma_reserve_channels;
 
-static spinlock_t dma_chan_lock;
+static DEFINE_SPINLOCK(dma_chan_lock);
 static struct omap_dma_lch *dma_chan;
 
 static inline void disable_lnk(int lch);
@@ -902,7 +902,6 @@ static int omap_system_dma_probe(struct platform_device *pdev)
        if (!dma_chan)
                return -ENOMEM;
 
-       spin_lock_init(&dma_chan_lock);
        for (ch = 0; ch < dma_chan_count; ch++) {
                omap_clear_dma(ch);