Commit b06eba5c authored by Nicolas Saenz Julienne's avatar Nicolas Saenz Julienne Committed by Greg Kroah-Hartman
Browse files

staging: vchiq: Unify fourcc definition mechanisms



There is already enough duplication with regard to fourcc generation in
the kernel. Let's at least use the same macro all over the vchiq
ecosystem.

Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-35-nsaenzjulienne@suse.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1d362f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ vc_vchi_audio_init(struct vchiq_instance *vchiq_instance,
	struct vchiq_service_params params = {
		.version		= VC_AUDIOSERV_VER,
		.version_min		= VC_AUDIOSERV_MIN_VER,
		.fourcc			= VC_AUDIO_SERVER_NAME,
		.fourcc			= VCHIQ_MAKE_FOURCC('A', 'U', 'D', 'S'),
		.callback		= audio_vchi_callback,
		.userdata		= instance,
	};
+2 −3
Original line number Diff line number Diff line
@@ -8,9 +8,8 @@
#define VC_AUDIOSERV_VER 2

/* FourCC codes used for VCHI communication */
#define VC_AUDIO_SERVER_NAME  MAKE_FOURCC("AUDS")
#define VC_AUDIO_WRITE_COOKIE1 MAKE_FOURCC("BCMA")
#define VC_AUDIO_WRITE_COOKIE2 MAKE_FOURCC("DATA")
#define VC_AUDIO_WRITE_COOKIE1 VCHIQ_MAKE_FOURCC('B', 'C', 'M', 'A')
#define VC_AUDIO_WRITE_COOKIE2 VCHIQ_MAKE_FOURCC('D', 'A', 'T', 'A')

/*
 *  List of screens that are currently supported
+0 −3
Original line number Diff line number Diff line
@@ -8,9 +8,6 @@
 * Global defs
 *****************************************************************************/

// Macros to manipulate 'FOURCC' values
#define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3]))

// Opaque handle for a VCHIQ instance
struct vchiq_instance;

+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@

#define VC_MMAL_VER 15
#define VC_MMAL_MIN_VER 10
#define VC_MMAL_SERVER_NAME  MAKE_FOURCC("mmal")

/* max total message size is 512 bytes */
#define MMAL_MSG_MAX_SIZE 512
+1 −1
Original line number Diff line number Diff line
@@ -1863,7 +1863,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
	struct vchiq_service_params params = {
		.version		= VC_MMAL_VER,
		.version_min		= VC_MMAL_MIN_VER,
		.fourcc			= VC_MMAL_SERVER_NAME,
		.fourcc			= VCHIQ_MAKE_FOURCC('m', 'm', 'a', 'l'),
		.callback		= service_callback,
		.userdata		= NULL,
	};