]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: vc04_services: Do not pass NULL to vchiq_log_error()
authorUmang Jain <umang.jain@ideasonboard.com>
Tue, 28 Nov 2023 20:19:22 +0000 (01:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Dec 2023 07:08:56 +0000 (08:08 +0100)
vchiq_add_connected_callback() logs using vchiq_log_error() macro,
but passes NULL instead of a struct device pointer. Fix it.

vchiq_add_connected_callback() is not used anywhere in the vc04_services
as of now. It will be used when we add new drivers(VC shared memory and
bcm2835-isp), hence it kept as it is for now.

Fixes: 1d8915cf8899 ("staging: vc04: Convert vchiq_log_error() to use dynamic debug")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20231128201926.489269-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h

index b3928bd8c9c6056fae3104335c2af86ca5bc62a8..21f9fa1a171329d22338834203e2ef5f21b9f753 100644 (file)
@@ -27,7 +27,7 @@ static void connected_init(void)
  * be made immediately, otherwise it will be deferred until
  * vchiq_call_connected_callbacks is called.
  */
-void vchiq_add_connected_callback(void (*callback)(void))
+void vchiq_add_connected_callback(struct vchiq_device *device, void (*callback)(void))
 {
        connected_init();
 
@@ -39,7 +39,7 @@ void vchiq_add_connected_callback(void (*callback)(void))
                callback();
        } else {
                if (g_num_deferred_callbacks >= MAX_CALLBACKS) {
-                       vchiq_log_error(NULL, VCHIQ_CORE,
+                       vchiq_log_error(&device->dev, VCHIQ_CORE,
                                        "There already %d callback registered - please increase MAX_CALLBACKS",
                                        g_num_deferred_callbacks);
                } else {
index 4caf5e30099dc3db7254823534be0cbd1ee0710a..e4ed56446f8ad3eaf0c7d3787887d9c286064015 100644 (file)
@@ -1,10 +1,12 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /* Copyright (c) 2010-2012 Broadcom. All rights reserved. */
 
+#include "vchiq_bus.h"
+
 #ifndef VCHIQ_CONNECTED_H
 #define VCHIQ_CONNECTED_H
 
-void vchiq_add_connected_callback(void (*callback)(void));
+void vchiq_add_connected_callback(struct vchiq_device *device, void (*callback)(void));
 void vchiq_call_connected_callbacks(void);
 
 #endif /* VCHIQ_CONNECTED_H */