diff mbox series

hw/i386/pc: Clean up pc_machine_initfn

Message ID 20230609164107.23404-1-suravee.suthikulpanit@amd.com (mailing list archive)
State New, archived
Headers show
Series hw/i386/pc: Clean up pc_machine_initfn | expand

Commit Message

Suravee Suthikulpanit June 9, 2023, 4:41 p.m. UTC
To use the newly introduced PC machine class local variable.

Suggedted-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé June 9, 2023, 9:57 p.m. UTC | #1
On 9/6/23 18:41, Suravee Suthikulpanit wrote:
> To use the newly introduced PC machine class local variable.
> 
> Suggedted-by: Igor Mammedov <imammedo@redhat.com>

"Suggested-by"

> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
>   hw/i386/pc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 33ffb03a32..f8d105e829 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1864,7 +1864,7 @@ static void pc_machine_initfn(Object *obj)
>       pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type;
>   
>       /* acpi build is enabled by default if machine supports it */
> -    pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
> +    pcms->acpi_build_enabled = pcmc->has_acpi_build;
>       pcms->smbus_enabled = true;
>       pcms->sata_enabled = true;
>       pcms->i8042_enabled = true;
diff mbox series

Patch

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 33ffb03a32..f8d105e829 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1864,7 +1864,7 @@  static void pc_machine_initfn(Object *obj)
     pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type;
 
     /* acpi build is enabled by default if machine supports it */
-    pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
+    pcms->acpi_build_enabled = pcmc->has_acpi_build;
     pcms->smbus_enabled = true;
     pcms->sata_enabled = true;
     pcms->i8042_enabled = true;