qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] hw/isa/vt82c686: Consolidate the use of device_class_set


From: Thomas Huth
Subject: Re: [PATCH 1/4] hw/isa/vt82c686: Consolidate the use of device_class_set_parent_realize()
Date: Thu, 1 Feb 2024 09:33:45 +0100
User-agent: Mozilla Thunderbird

On 01/02/2024 09.40, Zhao Liu wrote:
From: Zhao Liu <zhao1.liu@intel.com>

Use device_class_set_parent_realize() to set parent realize() directly.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
  hw/isa/vt82c686.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index d3e0f6d01fb6..a99eae4f6333 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -328,8 +328,8 @@ static void via_superio_class_init(ObjectClass *klass, void 
*data)
      DeviceClass *dc = DEVICE_CLASS(klass);
      ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
- sc->parent_realize = dc->realize;
-    dc->realize = via_superio_realize;
+    device_class_set_parent_realize(dc, via_superio_realize,
+                                    &sc->parent_realize);
  }
static const TypeInfo via_superio_info = {

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]