Revision 0e0bfeea hw/slavio_timer.c
b/hw/slavio_timer.c | ||
---|---|---|
362 | 362 |
} |
363 | 363 |
}; |
364 | 364 |
|
365 |
static void slavio_timer_reset(void *opaque)
|
|
365 |
static void slavio_timer_reset(DeviceState *d)
|
|
366 | 366 |
{ |
367 |
SLAVIO_TIMERState *s = opaque;
|
|
367 |
SLAVIO_TIMERState *s = container_of(d, SLAVIO_TIMERState, busdev.qdev);
|
|
368 | 368 |
unsigned int i; |
369 | 369 |
CPUTimerState *curr_timer; |
370 | 370 |
|
... | ... | |
411 | 411 |
sysbus_init_irq(dev, &s->cputimer[i].irq); |
412 | 412 |
} |
413 | 413 |
|
414 |
vmstate_register(-1, &vmstate_slavio_timer, s); |
|
415 |
qemu_register_reset(slavio_timer_reset, s); |
|
416 |
slavio_timer_reset(s); |
|
414 |
slavio_timer_reset(&s->busdev.qdev); |
|
415 |
|
|
417 | 416 |
return 0; |
418 | 417 |
} |
419 | 418 |
|
... | ... | |
421 | 420 |
.init = slavio_timer_init1, |
422 | 421 |
.qdev.name = "slavio_timer", |
423 | 422 |
.qdev.size = sizeof(SLAVIO_TIMERState), |
423 |
.qdev.vmsd = &vmstate_slavio_timer, |
|
424 |
.qdev.reset = slavio_timer_reset, |
|
424 | 425 |
.qdev.props = (Property[]) { |
425 | 426 |
DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0), |
426 | 427 |
DEFINE_PROP_END_OF_LIST(), |
Also available in: Unified diff