[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] acpi: Don't pass const pointers to object_property_add_uint*
From: |
Eduardo Habkost |
Subject: |
[PATCH 1/3] acpi: Don't pass const pointers to object_property_add_uint*_ptr() |
Date: |
Fri, 9 Oct 2020 15:15:18 -0400 |
object_property_add_uint*_ptr() will be changed to get non-const
pointers. Adapt the ACPI code to that.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/acpi/ich9.c | 2 +-
hw/acpi/piix4.c | 10 +++++-----
hw/isa/lpc_ich9.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 95cb0f935b..9bb8d1b155 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -371,7 +371,7 @@ static void ich9_pm_set_enable_tco(Object *obj, bool value,
Error **errp)
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
{
- static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN;
+ static uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN;
pm->acpi_memory_hotplug.is_enabled = true;
pm->cpu_hotplug_legacy = true;
pm->disable_s3 = 0;
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 894d357f8c..1e8a15676d 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -439,11 +439,11 @@ static void piix4_pm_machine_ready(Notifier *n, void
*opaque)
static void piix4_pm_add_propeties(PIIX4PMState *s)
{
- static const uint8_t acpi_enable_cmd = ACPI_ENABLE;
- static const uint8_t acpi_disable_cmd = ACPI_DISABLE;
- static const uint32_t gpe0_blk = GPE_BASE;
- static const uint32_t gpe0_blk_len = GPE_LEN;
- static const uint16_t sci_int = 9;
+ static uint8_t acpi_enable_cmd = ACPI_ENABLE;
+ static uint8_t acpi_disable_cmd = ACPI_DISABLE;
+ static uint32_t gpe0_blk = GPE_BASE;
+ static uint32_t gpe0_blk_len = GPE_LEN;
+ static uint16_t sci_int = 9;
object_property_add_uint8_ptr(OBJECT(s), ACPI_PM_PROP_ACPI_ENABLE_CMD,
&acpi_enable_cmd, OBJ_PROP_FLAG_READ);
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 04e5323140..b9dc01f654 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -638,8 +638,8 @@ static void ich9_lpc_initfn(Object *obj)
{
ICH9LPCState *lpc = ICH9_LPC_DEVICE(obj);
- static const uint8_t acpi_enable_cmd = ICH9_APM_ACPI_ENABLE;
- static const uint8_t acpi_disable_cmd = ICH9_APM_ACPI_DISABLE;
+ static uint8_t acpi_enable_cmd = ICH9_APM_ACPI_ENABLE;
+ static uint8_t acpi_disable_cmd = ICH9_APM_ACPI_DISABLE;
object_property_add_uint8_ptr(obj, ACPI_PM_PROP_SCI_INT,
&lpc->sci_gsi, OBJ_PROP_FLAG_READ);
--
2.26.2