aboutsummaryrefslogtreecommitdiff
path: root/hw/audio
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-01-06 22:06:36 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-02-27 22:29:02 +0100
commitacab7d6022943a710472028e4e7f0010ee4f9376 (patch)
treec5b8e39e7205173c1435bdda3e3ffc9685e74d76 /hw/audio
parent2dbf9dd80bd14f7935fd9f722ed3cb87c5b9b0f5 (diff)
hw/audio/hda-codec: Avoid forward-declaring HDAAudioState
To avoid forward-declaring HDAAudioState, declare HDA_AUDIO QOM definitions before its use in the HDAAudioStream structure. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230220131837.26292-2-philmd@linaro.org>
Diffstat (limited to 'hw/audio')
-rw-r--r--hw/audio/hda-codec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index feb8f9e2bb..c51d8ba617 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -145,7 +145,9 @@ static const char *fmt2name[] = {
[ AUDIO_FORMAT_S32 ] = "PCM-S32",
};
-typedef struct HDAAudioState HDAAudioState;
+#define TYPE_HDA_AUDIO "hda-audio"
+OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO)
+
typedef struct HDAAudioStream HDAAudioStream;
struct HDAAudioStream {
@@ -171,9 +173,6 @@ struct HDAAudioStream {
int64_t buft_start;
};
-#define TYPE_HDA_AUDIO "hda-audio"
-OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO)
-
struct HDAAudioState {
HDACodecDevice hda;
const char *name;