* [PATCH v2 -next] atmel: at76c50x: use DEFINE_MUTEX() for mutex lock
@ 2020-12-24 13:24 Zheng Yongjun
2021-02-08 11:15 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-24 13:24 UTC (permalink / raw)
To: kvalo, davem, kuba, linux-wireless, netdev, linux-kernel; +Cc: Zheng Yongjun
mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/wireless/atmel/at76c50x-usb.c | 4 +---
1 file changed, 1 insertion(+), 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)
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 -next] atmel: at76c50x: use DEFINE_MUTEX() for mutex lock
2020-12-24 13:24 [PATCH v2 -next] atmel: at76c50x: use DEFINE_MUTEX() for mutex lock Zheng Yongjun
@ 2021-02-08 11:15 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-02-08 11:15 UTC (permalink / raw)
To: Zheng Yongjun
Cc: davem, kuba, linux-wireless, netdev, linux-kernel, Zheng Yongjun
Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
> mutex lock can be initialized automatically with DEFINE_MUTEX()
> rather than explicitly calling mutex_init().
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
ae30a740a176 atmel: at76c50x: use DEFINE_MUTEX() for mutex lock
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201224132456.31341-1-zhengyongjun3@huawei.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-08 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 13:24 [PATCH v2 -next] atmel: at76c50x: use DEFINE_MUTEX() for mutex lock Zheng Yongjun
2021-02-08 11:15 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.