diff mbox series

[for-8.0,9/9] hw: Remove device_legacy_reset()

Message ID 20221104161513.2455862-10-peter.maydell@linaro.org
State Handled Elsewhere
Headers show
Series reset: Remove some deprecated APIs | expand

Commit Message

Peter Maydell Nov. 4, 2022, 4:15 p.m. UTC
The device_legacy_reset() function is now not used anywhere, so we
can remove the implementation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/hw/qdev-core.h |  9 ---------
 hw/core/qdev.c         | 10 ----------
 2 files changed, 19 deletions(-)

Comments

Philippe Mathieu-Daudé Nov. 4, 2022, 5:43 p.m. UTC | #1
On 4/11/22 17:15, Peter Maydell wrote:
> The device_legacy_reset() function is now not used anywhere, so we
> can remove the implementation.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   include/hw/qdev-core.h |  9 ---------
>   hw/core/qdev.c         | 10 ----------
>   2 files changed, 19 deletions(-)

> -void device_legacy_reset(DeviceState *dev)
> -{
> -    DeviceClass *klass = DEVICE_GET_CLASS(dev);
> -
> -    trace_qdev_reset(dev, object_get_typename(OBJECT(dev)));

We can remove the "qdev_reset" entry in hw/core/trace-events.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> -    if (klass->reset) {
> -        klass->reset(dev);
> -    }
> -}
diff mbox series

Patch

diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index c7eda169d78..35fddb19a64 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -776,15 +776,6 @@  BusState *sysbus_get_default(void);
 char *qdev_get_fw_dev_path(DeviceState *dev);
 char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
 
-/**
- * device_legacy_reset:
- *
- * Reset a single device (by calling the reset method).
- * Note: This function is deprecated and will be removed when it becomes unused.
- * Please use device_cold_reset() now.
- */
-void device_legacy_reset(DeviceState *dev);
-
 void device_class_set_props(DeviceClass *dc, Property *props);
 
 /**
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 3b0f04c5c6d..2743191efe7 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -857,16 +857,6 @@  void device_class_set_parent_unrealize(DeviceClass *dc,
     dc->unrealize = dev_unrealize;
 }
 
-void device_legacy_reset(DeviceState *dev)
-{
-    DeviceClass *klass = DEVICE_GET_CLASS(dev);
-
-    trace_qdev_reset(dev, object_get_typename(OBJECT(dev)));
-    if (klass->reset) {
-        klass->reset(dev);
-    }
-}
-
 Object *qdev_get_machine(void)
 {
     static Object *dev;