From: Philippe Mathieu-Daudé Date: Mon, 20 Feb 2023 10:47:14 +0000 (+0100) Subject: hw/audio/ac97: Replace container_of() by AC97() QOM cast macro X-Git-Tag: v8.0.0-rc0~41^2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=911a6afbc56c2179445ff04ad428500d85e5c0f9;p=thirdparty%2Fqemu.git hw/audio/ac97: Replace container_of() by AC97() QOM cast macro Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220131837.26292-5-philmd@linaro.org> --- diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 364cdfa7333..b3a45bb49f8 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]);