From c697fc80a8e7ee0594afbbf0758fcf889f47d31e Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sat, 5 Mar 2022 15:09:51 +0000 Subject: mos6522: use device_class_set_parent_reset() to propagate reset to parent Switch from using a legacy approach to the more formal approach for propagating device reset to the parent. Signed-off-by: Mark Cave-Ayland Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier Message-Id: <20220305150957.5053-7-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/misc/macio/cuda.c') diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 693fc82e05..1498113cfc 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -606,7 +606,8 @@ static void mos6522_cuda_class_init(ObjectClass *oc, void *data) DeviceClass *dc = DEVICE_CLASS(oc); MOS6522DeviceClass *mdc = MOS6522_CLASS(oc); - dc->reset = mos6522_cuda_reset; + device_class_set_parent_reset(dc, mos6522_cuda_reset, + &mdc->parent_reset); mdc->portB_write = mos6522_cuda_portB_write; mdc->get_timer1_counter_value = cuda_get_counter_value; mdc->get_timer2_counter_value = cuda_get_counter_value; -- cgit v1.2.3