diff options
author | Umang Jain <umang.jain@ideasonboard.com> | 2024-04-12 09:57:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-18 16:53:32 +0200 |
commit | e82b22539a89d48140cddca896a53e174b7e05a9 (patch) | |
tree | adc408847ba60f088b34f78a1b2bfb3ea26a50bc | |
parent | staging: vc04_services: Re-align function parameters (diff) | |
download | linux-e82b22539a89d48140cddca896a53e174b7e05a9.tar.xz linux-e82b22539a89d48140cddca896a53e174b7e05a9.zip |
staging: vc04_services: Drop g_once_init global variable
g_once_init is not used in a meaningful way anywhere. Drop it
along with connected_init() which sets it.
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c | 12 |
1 files changed, 0 insertions, 12 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 3cad13f09e37..4604a2f4d2de 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -11,16 +11,8 @@ static int g_connected; static int g_num_deferred_callbacks; static void (*g_deferred_callback[MAX_CALLBACKS])(void); -static int g_once_init; static DEFINE_MUTEX(g_connected_mutex); -/* Function to initialize our lock */ -static void connected_init(void) -{ - if (!g_once_init) - g_once_init = 1; -} - /* * This function is used to defer initialization until the vchiq stack is * initialized. If the stack is already initialized, then the callback will @@ -29,8 +21,6 @@ static void connected_init(void) */ void vchiq_add_connected_callback(struct vchiq_device *device, void (*callback)(void)) { - connected_init(); - if (mutex_lock_killable(&g_connected_mutex)) return; @@ -60,8 +50,6 @@ void vchiq_call_connected_callbacks(void) { int i; - connected_init(); - if (mutex_lock_killable(&g_connected_mutex)) return; |