Commit e9642be2 authored by Guobin Huang's avatar Guobin Huang Committed by Kalle Valo

rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarGuobin Huang <huangguobin4@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1617711406-49649-1-git-send-email-huangguobin4@huawei.com
parent fb98734f
...@@ -372,18 +372,14 @@ static struct pci_driver rtl92de_driver = { ...@@ -372,18 +372,14 @@ static struct pci_driver rtl92de_driver = {
/* add global spin lock to solve the problem that /* add global spin lock to solve the problem that
* Dul mac register operation on the same time */ * Dul mac register operation on the same time */
spinlock_t globalmutex_power; DEFINE_SPINLOCK(globalmutex_power);
spinlock_t globalmutex_for_fwdownload; DEFINE_SPINLOCK(globalmutex_for_fwdownload);
spinlock_t globalmutex_for_power_and_efuse; DEFINE_SPINLOCK(globalmutex_for_power_and_efuse);
static int __init rtl92de_module_init(void) static int __init rtl92de_module_init(void)
{ {
int ret = 0; int ret = 0;
spin_lock_init(&globalmutex_power);
spin_lock_init(&globalmutex_for_fwdownload);
spin_lock_init(&globalmutex_for_power_and_efuse);
ret = pci_register_driver(&rtl92de_driver); ret = pci_register_driver(&rtl92de_driver);
if (ret) if (ret)
WARN_ONCE(true, "rtl8192de: No device found\n"); WARN_ONCE(true, "rtl8192de: No device found\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment