staging: vc04_services: Remove SERVICE_CREATION_T typedef
authorDominic Braun <inf.braun@fau.de>
Fri, 14 Dec 2018 12:04:41 +0000 (13:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 13:31:47 +0000 (14:31 +0100)
Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
drivers/staging/vc04_services/interface/vchi/vchi.h
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c

index c0debdb..23fba01 100644 (file)
@@ -122,7 +122,7 @@ static int
 vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
                   struct bcm2835_audio_instance *instance)
 {
-       SERVICE_CREATION_T params = {
+       struct service_creation params = {
                .version                = VCHI_VERSION_EX(VC_AUDIOSERV_VER, VC_AUDIOSERV_MIN_VER),
                .service_id             = VC_AUDIO_SERVER_NAME,
                .callback               = audio_vchi_callback,
index bffd75d..c6d06f1 100644 (file)
@@ -1806,7 +1806,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
        int status;
        struct vchiq_mmal_instance *instance;
        static VCHI_INSTANCE_T vchi_instance;
-       SERVICE_CREATION_T params = {
+       struct service_creation params = {
                .version                = VCHI_VERSION_EX(VC_MMAL_VER, VC_MMAL_MIN_VER),
                .service_id             = VC_MMAL_SERVER_NAME,
                .callback               = service_callback,
index e326926..ee63d28 100644 (file)
@@ -72,12 +72,12 @@ typedef struct {
 } VCHI_HELD_MSG_T;
 
 // structure used to provide the information needed to open a server or a client
-typedef struct {
+struct service_creation {
        struct vchi_version version;
        int32_t service_id;
        VCHI_CALLBACK_T callback;
        void *callback_param;
-} SERVICE_CREATION_T;
+};
 
 // Opaque handle for a VCHI instance
 typedef struct opaque_vchi_instance_handle_t *VCHI_INSTANCE_T;
@@ -117,7 +117,7 @@ extern int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle);
 
 // Routine to open a named service
 extern int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
-                                SERVICE_CREATION_T *setup,
+                                struct service_creation *setup,
                                 VCHI_SERVICE_HANDLE_T *handle);
 
 extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle,
index 81cac68..0971f19 100644 (file)
@@ -530,7 +530,7 @@ EXPORT_SYMBOL(vchi_disconnect);
  * Name: vchi_service_create
  *
  * Arguments: VCHI_INSTANCE_T *instance_handle
- *            SERVICE_CREATION_T *setup,
+ *            struct service_creation *setup,
  *            VCHI_SERVICE_HANDLE_T *handle
  *
  * Description: Routine to open a service
@@ -600,7 +600,7 @@ done:
 }
 
 static struct shim_service *service_alloc(VCHIQ_INSTANCE_T instance,
-       SERVICE_CREATION_T *setup)
+       struct service_creation *setup)
 {
        struct shim_service *service = kzalloc(sizeof(struct shim_service), GFP_KERNEL);
 
@@ -628,7 +628,7 @@ static void service_free(struct shim_service *service)
 }
 
 int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
-       SERVICE_CREATION_T *setup,
+       struct service_creation *setup,
        VCHI_SERVICE_HANDLE_T *handle)
 {
        VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle;