diff options
Diffstat (limited to 'hw/ac97.c')
-rw-r--r-- | hw/ac97.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1196,7 +1196,7 @@ static void ac97_save (QEMUFile *f, void *opaque) qemu_put_be32s (f, &s->glob_sta); qemu_put_be32s (f, &s->cas); - for (i = 0; i < sizeof (s->bm_regs) / sizeof (s->bm_regs[0]); ++i) { + for (i = 0; i < ARRAY_SIZE (s->bm_regs); ++i) { AC97BusMasterRegs *r = &s->bm_regs[i]; qemu_put_be32s (f, &r->bdbar); qemu_put_8s (f, &r->civ); @@ -1235,7 +1235,7 @@ static int ac97_load (QEMUFile *f, void *opaque, int version_id) qemu_get_be32s (f, &s->glob_sta); qemu_get_be32s (f, &s->cas); - for (i = 0; i < sizeof (s->bm_regs) / sizeof (s->bm_regs[0]); ++i) { + for (i = 0; i < ARRAY_SIZE (s->bm_regs); ++i) { AC97BusMasterRegs *r = &s->bm_regs[i]; qemu_get_be32s (f, &r->bdbar); qemu_get_8s (f, &r->civ); |