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

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.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1d362f4
......@@ -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,
};
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment