staging: vchiq: Replace function typedefs with equivalent declaration
authorOjaswin Mujoo <ojaswin98@gmail.com>
Sat, 11 Sep 2021 13:23:25 +0000 (18:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 16:16:44 +0000 (18:16 +0200)
Replace function typedefs with the equivalent declarations to better
align with the linux kenel coding style

The following typedefs were changed:
*  VCHIQ_CONNECTED_CALLBACK_T
*  vchiq_userdata_term

Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com>
Link: https://lore.kernel.org/r/a8e4e0457b5fcc88c7f297f9d669dfb7e7d91ed5.1631366317.git.ojaswin98@gmail.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
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h

index 0ee96d1d0481732aef777ee624a8f4ec814c3225..83502f5f3a3328e02efd83ce8f77a9b63de1f562 100644 (file)
@@ -10,7 +10,7 @@
 
 static   int                        g_connected;
 static   int                        g_num_deferred_callbacks;
-static   VCHIQ_CONNECTED_CALLBACK_T g_deferred_callback[MAX_CALLBACKS];
+static   void (*g_deferred_callback[MAX_CALLBACKS])(void);
 static   int                        g_once_init;
 static   DEFINE_MUTEX(g_connected_mutex);
 
@@ -28,7 +28,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(VCHIQ_CONNECTED_CALLBACK_T callback)
+void vchiq_add_connected_callback(void (*callback)(void))
 {
        connected_init();
 
index 95c18670e839495408d185ad70a0e26f44ede30f..4caf5e30099dc3db7254823534be0cbd1ee0710a 100644 (file)
@@ -4,9 +4,7 @@
 #ifndef VCHIQ_CONNECTED_H
 #define VCHIQ_CONNECTED_H
 
-typedef void (*VCHIQ_CONNECTED_CALLBACK_T)(void);
-
-void vchiq_add_connected_callback(VCHIQ_CONNECTED_CALLBACK_T callback);
+void vchiq_add_connected_callback(void (*callback)(void));
 void vchiq_call_connected_callbacks(void);
 
 #endif /* VCHIQ_CONNECTED_H */
index 9429b8a642fbbe4030cb2db15f17838bbb1f6265..083abfd8e212ebac52054bf44bef18deee365f32 100644 (file)
@@ -2474,7 +2474,7 @@ struct vchiq_service *
 vchiq_add_service_internal(struct vchiq_state *state,
                           const struct vchiq_service_params_kernel *params,
                           int srvstate, struct vchiq_instance *instance,
-                          vchiq_userdata_term userdata_term)
+                          void (*userdata_term)(void *userdata))
 {
        struct vchiq_service *service;
        struct vchiq_service __rcu **pservice = NULL;
index 957fea1f574f3cab9d68fabfd5e4c277d5ea24d4..3ef4cbe1053c47e02179c3915180f47a52ee6950 100644 (file)
@@ -152,8 +152,6 @@ enum vchiq_bulk_dir {
        VCHIQ_BULK_RECEIVE
 };
 
-typedef void (*vchiq_userdata_term)(void *userdata);
-
 struct vchiq_bulk {
        short mode;
        short dir;
@@ -198,7 +196,7 @@ struct vchiq_service {
        struct kref ref_count;
        struct rcu_head rcu;
        int srvstate;
-       vchiq_userdata_term userdata_term;
+       void (*userdata_term)(void *userdata);
        unsigned int localport;
        unsigned int remoteport;
        int public_fourcc;
@@ -476,7 +474,7 @@ struct vchiq_service *
 vchiq_add_service_internal(struct vchiq_state *state,
                           const struct vchiq_service_params_kernel *params,
                           int srvstate, struct vchiq_instance *instance,
-                          vchiq_userdata_term userdata_term);
+                          void (*userdata_term)(void *userdata));
 
 extern enum vchiq_status
 vchiq_open_service_internal(struct vchiq_service *service, int client_id);