Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: wan: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Zheng Yongjun and committed by
David S. Miller
5b34af86 520ec343

+1 -3
+1 -3
drivers/net/wan/ixp4xx_hss.c
··· 323 323 324 324 static int ports_open; 325 325 static struct dma_pool *dma_pool; 326 - static spinlock_t npe_lock; 326 + static DEFINE_SPINLOCK(npe_lock); 327 327 328 328 static const struct { 329 329 int tx, txdone, rx, rxfree; ··· 1401 1401 (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) != 1402 1402 (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) 1403 1403 return -ENODEV; 1404 - 1405 - spin_lock_init(&npe_lock); 1406 1404 1407 1405 return platform_driver_register(&ixp4xx_hss_driver); 1408 1406 }