diff options
author | Lifu Chen <chenlifu@huawei.com> | 2021-03-27 10:52:27 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2021-03-31 07:58:42 +0200 |
commit | 235e384526e44e902087fd5012e6ac6e8877f1d1 (patch) | |
tree | c021d4bb33fe79cac1c5a0c73ef12aac348dd7de /arch/arm/plat-omap | |
parent | ARM: OMAP2+: use true and false for bool variable (diff) | |
download | linux-235e384526e44e902087fd5012e6ac6e8877f1d1.tar.xz linux-235e384526e44e902087fd5012e6ac6e8877f1d1.zip |
ARM: OMAP2+: Use DEFINE_SPINLOCK() for spinlock
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>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 1eb59003bdec..9f11de46aaa9 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -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); |