Message ID | 20230220131837.26292-2-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | hw/audio: Cleanups around QOM style | expand |
On 2/20/23 03:18, Philippe Mathieu-Daudé wrote: > 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> > --- > hw/audio/hda-codec.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
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;
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> --- hw/audio/hda-codec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)