diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-24 21:25:28 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-28 15:09:35 +0100 |
commit | 1790f2be41e48788314f0923174cd943b8bd6a54 (patch) | |
tree | ee5b45d5c127964b780e9b8524924f35992e7529 | |
parent | 6abeae2adc96a2d6eb1973b221e40cc776557197 (diff) |
staging: vc04_services: 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>
Link: https://lore.kernel.org/r/20201224132528.31558-1-zhengyongjun3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c index f91e21a0b51b..3023fa9fdc64 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -12,13 +12,12 @@ static int g_connected; static int g_num_deferred_callbacks; static VCHIQ_CONNECTED_CALLBACK_T g_deferred_callback[MAX_CALLBACKS]; static int g_once_init; -static struct mutex g_connected_mutex; +static DEFINE_MUTEX(g_connected_mutex); /* Function to initialize our lock */ static void connected_init(void) { if (!g_once_init) { - mutex_init(&g_connected_mutex); g_once_init = 1; } } |