mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -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
|
@ -254,7 +254,7 @@ void at24c_eeprom_class_init(ObjectClass *klass, void *data)
|
|||
k->send = &at24c_eeprom_send;
|
||||
|
||||
device_class_set_props(dc, at24c_eeprom_props);
|
||||
dc->reset = at24c_eeprom_reset;
|
||||
device_class_set_legacy_reset(dc, at24c_eeprom_reset);
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
@ -1260,7 +1260,7 @@ static void fw_cfg_class_init(ObjectClass *klass, void *data)
|
|||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->reset = fw_cfg_reset;
|
||||
device_class_set_legacy_reset(dc, fw_cfg_reset);
|
||||
dc->vmsd = &vmstate_fw_cfg;
|
||||
|
||||
device_class_set_props(dc, fw_cfg_properties);
|
||||
|
|
|
@ -147,7 +147,7 @@ static void macio_nvram_class_init(ObjectClass *oc, void *data)
|
|||
|
||||
dc->realize = macio_nvram_realizefn;
|
||||
dc->unrealize = macio_nvram_unrealizefn;
|
||||
dc->reset = macio_nvram_reset;
|
||||
device_class_set_legacy_reset(dc, macio_nvram_reset);
|
||||
dc->vmsd = &vmstate_macio_nvram;
|
||||
device_class_set_props(dc, macio_nvram_properties);
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
|
|
|
@ -378,7 +378,7 @@ static void nrf51_nvm_class_init(ObjectClass *klass, void *data)
|
|||
device_class_set_props(dc, nrf51_nvm_properties);
|
||||
dc->vmsd = &vmstate_nvm;
|
||||
dc->realize = nrf51_nvm_realize;
|
||||
dc->reset = nrf51_nvm_reset;
|
||||
device_class_set_legacy_reset(dc, nrf51_nvm_reset);
|
||||
}
|
||||
|
||||
static const TypeInfo nrf51_nvm_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue