diff mbox series

[PULL,073/126] hw/audio/ac97: Replace container_of() by AC97() QOM cast macro

Message ID 20230227140213.35084-64-philmd@linaro.org
State Accepted
Commit 911a6afbc56c2179445ff04ad428500d85e5c0f9
Headers show
Series None | expand

Commit Message

Philippe Mathieu-Daudé Feb. 27, 2023, 2:01 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230220131837.26292-5-philmd@linaro.org>
---
 hw/audio/ac97.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 364cdfa733..b3a45bb49f 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1295,7 +1295,7 @@  static const MemoryRegionOps ac97_io_nabm_ops = {
 
 static void ac97_on_reset(DeviceState *dev)
 {
-    AC97LinkState *s = container_of(dev, AC97LinkState, dev.qdev);
+    AC97LinkState *s = AC97(dev);
 
     reset_bm_regs(s, &s->bm_regs[0]);
     reset_bm_regs(s, &s->bm_regs[1]);