aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 21:58:55 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commit7d7aa2fd924c27829ec25f825481554dd81bce97 (patch)
tree658b87b89331670266163e522ea5fb52535633cb /target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch
parente7bfda2c243e66a75ff966ba04c28b1590b5d24c (diff)
downloadupstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.gz
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.bz2
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.zip
brcm2708: rename target to bcm27xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Despite, since subtargets range from bcm2708 to bcm2711, it seems appropriate to use bcm27xx instead of bcm2708 (again, as already done for BOARDNAME). This also renames the packages brcm2708-userland and brcm2708-gpu-fw. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch')
-rw-r--r--target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch105
1 files changed, 105 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch b/target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch
new file mode 100644
index 0000000000..e212a942ec
--- /dev/null
+++ b/target/linux/bcm27xx/patches-4.19/950-0404-staging-bcm2835-audio-use-anonymous-union-in-struct-.patch
@@ -0,0 +1,105 @@
+From 23b89436030e64196a1bc317901d08edd54fb772 Mon Sep 17 00:00:00 2001
+From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Date: Wed, 17 Oct 2018 21:01:53 +0200
+Subject: [PATCH] staging: bcm2835-audio: use anonymous union in struct
+ vc_audio_msg
+
+commit 9c2eaf7da855d314a369d48b9cbf8ac80717a1d0 upstream.
+
+In this case explicitly naming the union doesn't help overall code
+comprehension and clutters it.
+
+Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Reviewed-by: Takashi Iwai <tiwai@suse.de>
+Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ .../bcm2835-audio/bcm2835-vchiq.c | 30 +++++++++----------
+ .../bcm2835-audio/vc_vchi_audioserv_defs.h | 2 +-
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
+@@ -104,15 +104,15 @@ static void audio_vchi_callback(void *pa
+ status = vchi_msg_dequeue(instance->vchi_handle,
+ &m, sizeof(m), &msg_len, VCHI_FLAGS_NONE);
+ if (m.type == VC_AUDIO_MSG_TYPE_RESULT) {
+- instance->result = m.u.result.success;
++ instance->result = m.result.success;
+ complete(&instance->msg_avail_comp);
+ } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) {
+- if (m.u.complete.cookie1 != VC_AUDIO_WRITE_COOKIE1 ||
+- m.u.complete.cookie2 != VC_AUDIO_WRITE_COOKIE2)
++ if (m.complete.cookie1 != VC_AUDIO_WRITE_COOKIE1 ||
++ m.complete.cookie2 != VC_AUDIO_WRITE_COOKIE2)
+ dev_err(instance->dev, "invalid cookie\n");
+ else
+ bcm2835_playback_fifo(instance->alsa_stream,
+- m.u.complete.count);
++ m.complete.count);
+ } else {
+ dev_err(instance->dev, "unexpected callback type=%d\n", m.type);
+ }
+@@ -257,11 +257,11 @@ int bcm2835_audio_set_ctls(struct bcm283
+ struct vc_audio_msg m = {};
+
+ m.type = VC_AUDIO_MSG_TYPE_CONTROL;
+- m.u.control.dest = chip->dest;
++ m.control.dest = chip->dest;
+ if (!chip->mute)
+- m.u.control.volume = CHIP_MIN_VOLUME;
++ m.control.volume = CHIP_MIN_VOLUME;
+ else
+- m.u.control.volume = alsa2chip(chip->volume);
++ m.control.volume = alsa2chip(chip->volume);
+
+ return bcm2835_audio_send_msg(alsa_stream->instance, &m, true);
+ }
+@@ -272,9 +272,9 @@ int bcm2835_audio_set_params(struct bcm2
+ {
+ struct vc_audio_msg m = {
+ .type = VC_AUDIO_MSG_TYPE_CONFIG,
+- .u.config.channels = channels,
+- .u.config.samplerate = samplerate,
+- .u.config.bps = bps,
++ .config.channels = channels,
++ .config.samplerate = samplerate,
++ .config.bps = bps,
+ };
+ int err;
+
+@@ -302,7 +302,7 @@ int bcm2835_audio_drain(struct bcm2835_a
+ {
+ struct vc_audio_msg m = {
+ .type = VC_AUDIO_MSG_TYPE_STOP,
+- .u.stop.draining = 1,
++ .stop.draining = 1,
+ };
+
+ return bcm2835_audio_send_msg(alsa_stream->instance, &m, false);
+@@ -330,10 +330,10 @@ int bcm2835_audio_write(struct bcm2835_a
+ struct bcm2835_audio_instance *instance = alsa_stream->instance;
+ struct vc_audio_msg m = {
+ .type = VC_AUDIO_MSG_TYPE_WRITE,
+- .u.write.count = size,
+- .u.write.max_packet = instance->max_packet,
+- .u.write.cookie1 = VC_AUDIO_WRITE_COOKIE1,
+- .u.write.cookie2 = VC_AUDIO_WRITE_COOKIE2,
++ .write.count = size,
++ .write.max_packet = instance->max_packet,
++ .write.cookie1 = VC_AUDIO_WRITE_COOKIE1,
++ .write.cookie2 = VC_AUDIO_WRITE_COOKIE2,
+ };
+ unsigned int count;
+ int err, status;
+--- a/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h
++++ b/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h
+@@ -93,7 +93,7 @@ struct vc_audio_msg {
+ struct vc_audio_write write;
+ struct vc_audio_result result;
+ struct vc_audio_complete complete;
+- } u;
++ };
+ };
+
+ #endif /* _VC_AUDIO_DEFS_H_ */