qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v3 4/7] hw:sdhci: Directly set sd_spec_version instead of propert


From: Jamin Lin
Subject: [PATCH v3 4/7] hw:sdhci: Directly set sd_spec_version instead of property
Date: Wed, 4 Dec 2024 16:05:20 +0800

Directly set sd_spec_version instead of property and remove
unused local variable.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 hw/sd/aspeed_sdhci.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c
index ccaeefa75b..4e64e2537a 100644
--- a/hw/sd/aspeed_sdhci.c
+++ b/hw/sd/aspeed_sdhci.c
@@ -160,13 +160,9 @@ static void aspeed_sdhci_realize(DeviceState *dev, Error 
**errp)
     sysbus_init_mmio(sbd, &sdhci->iomem);
 
     for (int i = 0; i < sdhci->num_slots; ++i) {
-        Object *sdhci_slot = OBJECT(&sdhci->slots[i]);
         SysBusDevice *sbd_slot = SYS_BUS_DEVICE(&sdhci->slots[i]);
 
-        if (!object_property_set_int(sdhci_slot, "sd-spec-version", 2, errp)) {
-            return;
-        }
-
+        sdhci->slots[i].sd_spec_version = 2;
         sdhci->slots[i].capareg = asc->capareg;
 
         if (!sysbus_realize(sbd_slot, errp)) {
-- 
2.34.1




reply via email to

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