mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw: Use device_class_set_legacy_reset() instead of opencoding
Use device_class_set_legacy_reset() instead of opencoding an assignment to DeviceClass::reset. This change was produced with: spatch --macro-file scripts/cocci-macro-file.h \ --sp-file scripts/coccinelle/device-reset.cocci \ --keep-comments --smpl-spacing --in-place --dir hw Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20240830145812.1967042-8-peter.maydell@linaro.org
This commit is contained in:
parent
134e0944f4
commit
e3d0814368
410 changed files with 448 additions and 448 deletions
|
@ -564,7 +564,7 @@ static void cuda_class_init(ObjectClass *oc, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
dc->realize = cuda_realize;
|
||||
dc->reset = cuda_reset;
|
||||
device_class_set_legacy_reset(dc, cuda_reset);
|
||||
dc->vmsd = &vmstate_cuda;
|
||||
device_class_set_props(dc, cuda_properties);
|
||||
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
|
||||
|
|
|
@ -194,7 +194,7 @@ static void macio_gpio_class_init(ObjectClass *oc, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
NMIClass *nc = NMI_CLASS(oc);
|
||||
|
||||
dc->reset = macio_gpio_reset;
|
||||
device_class_set_legacy_reset(dc, macio_gpio_reset);
|
||||
dc->vmsd = &vmstate_macio_gpio;
|
||||
nc->nmi_monitor_handler = macio_gpio_nmi;
|
||||
}
|
||||
|
|
|
@ -922,7 +922,7 @@ static void mac_dbdma_class_init(ObjectClass *oc, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
dc->realize = mac_dbdma_realize;
|
||||
dc->reset = mac_dbdma_reset;
|
||||
device_class_set_legacy_reset(dc, mac_dbdma_reset);
|
||||
dc->vmsd = &vmstate_dbdma;
|
||||
}
|
||||
|
||||
|
|
|
@ -770,7 +770,7 @@ static void pmu_class_init(ObjectClass *oc, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
dc->realize = pmu_realize;
|
||||
dc->reset = pmu_reset;
|
||||
device_class_set_legacy_reset(dc, pmu_reset);
|
||||
dc->vmsd = &vmstate_pmu;
|
||||
device_class_set_props(dc, pmu_properties);
|
||||
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue