summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-24 16:24:56 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-02-08 14:14:43 +0300
commitae30a740a1769d7afb37245b058aeb5e6e83f492 (patch)
tree07a10197eaa654eb3cea11ce566ed8ca8f65f33e
parent38eb712ada24d3ee3fcf02e0941c03bcb437f1e2 (diff)
downloadlinux-ae30a740a1769d7afb37245b058aeb5e6e83f492.tar.xz
atmel: at76c50x: use DEFINE_MUTEX() for mutex lock
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20201224132456.31341-1-zhengyongjun3@huawei.com
-rw-r--r--drivers/net/wireless/atmel/at76c50x-usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index 404257800033..7582761c61e2 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -101,7 +101,7 @@ do { \
static uint at76_debug = DBG_DEFAULTS;
/* Protect against concurrent firmware loading and parsing */
-static struct mutex fw_mutex;
+static DEFINE_MUTEX(fw_mutex);
static struct fwentry firmwares[] = {
[0] = { "" },
@@ -2572,8 +2572,6 @@ static int __init at76_mod_init(void)
printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " loading\n");
- mutex_init(&fw_mutex);
-
/* register this driver with the USB subsystem */
result = usb_register(&at76_driver);
if (result < 0)