From patchwork Mon Jan 9 09:26:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640602 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2044087pvb; Mon, 9 Jan 2023 01:41:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXvrlqQ35xkRkzFhAZlGBqX3aKtXa388XDrOJHdkzbHWie6u9fzxGjek48qfJ1DdSPR2aGLr X-Received: by 2002:a05:622a:991:b0:3a8:724:4a45 with SMTP id bw17-20020a05622a099100b003a807244a45mr101223097qtb.68.1673257279822; Mon, 09 Jan 2023 01:41:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673257279; cv=none; d=google.com; s=arc-20160816; b=i+9Fu2QSfiAT812wThynysFf80PoUuw3V4H1AQrDO7ktKg+P3a6HFdQqNvQjOnyKIM Q4VF2p1ylzJ32RyCnuZHobsFW0i9fMTOaFDOwBs7Lp8qnBrR5v+5E4nH5758Ux09syiy WGkenqbJfd2fjyMRWb7Rlu7+ersxo/q1q5Ty/OAGUMN97zsajps1knYBwd2ZhOg2B0pl wHAjcj5UPjaYnnUIybebBtAgQwY1n2ZX1mYqx76h4t3OWK68QIFFlahNS0k/JJQWUFnz A8YnTSL/h2h2qB7S7pbEdgq3BhgTFT2/1A43Nd6lnm5718antZ4MsBR1VEATdhhQ0A0i cfDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FvquKJo5kaY1zgQryRGVpaPOLLzwnxxyM3RwhB/Stuo=; b=kYG/JihOz5ylqxxtaZ80SIM7f42g+PxhlGyxYCZABRatIopxvn469Q5W+VGMgy02fx 9hCpMdydSzZ3cW02Zp3MR3rGB0xFtD62smNeeOdPsJ97XdpxvXa7Ijv59K0z0TamOrju zG3PynMUnvs1y6AApR7Xyw0IEO2d79WUbGohmIptdKHmSf335Xn6My1Xg1qCL+52xeKl EMfjxHgUIIZwr7b5xcywwVd5TptvgzkJSYBRvyLiUyOy78mWQmOejl8X6irruyErHQDv j/0cLI36+IVOV+9jSjtuO2KIjP3GFudlyvNWmD/7ufvs4Poj7L+qvTrTDRzFC7UI0oYk Pivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qJ/L/mGO"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ge14-20020a05622a5c8e00b003a6830c403esi4438118qtb.110.2023.01.09.01.41.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:41:19 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qJ/L/mGO"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEoQi-00043v-TI; Mon, 09 Jan 2023 04:26:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEoQg-00041g-CU for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:54 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQd-0005X7-UX for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:53 -0500 Received: by mail-wm1-x32f.google.com with SMTP id m26-20020a05600c3b1a00b003d9811fcaafso6100555wms.5 for ; Mon, 09 Jan 2023 01:26:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FvquKJo5kaY1zgQryRGVpaPOLLzwnxxyM3RwhB/Stuo=; b=qJ/L/mGOhcUGaMMHLzNnPOcFwLD8NaBXIhfwQAYAUDnykLgrt0YTjfFZUyh6ynbsMb KeIcdlWhlOoOIFJ6iBKzFxbVXLDujnFMjdo0kGnE6zoCqo3rgpfF7fElBogJmPJQ4Faz V8aAoNUQrTu9hHk33Xa2WHSjk+DJig+01NV4HFfpi7124f594YTC8iNqqAfJMt0n4KIf t8pnGVDB3QsQdeaVD+d4G24ZEbPJOM9YUJL2frQlDUFF6vxCQzTuxYnxmR3mFLjQcZfR 10+9oj39m+EWla99AZONe3urrwbt+8dDH1JomydDcr1KrBsum7n3Tp28HFPZyfEithix bUMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FvquKJo5kaY1zgQryRGVpaPOLLzwnxxyM3RwhB/Stuo=; b=X1KdH+A2JgiBQQk605Sbwj0YN55vJymkKJFXZj56WxR3qo88RFGpPbaEUpRK9Dz+d4 kPaX7pMl/WulE6+tF8DOhqi3Rd2MPEe7tkYO5q/EIFrSmAibfQyGuSGSWR/1GJ6NshZM j96iB1emyju8T3aLcchpm0dXLpu9cz55Iz08suIWO7r3Qq91ybYpVHpFsbDFLoT41xN/ efSx/lvHHykLH9fH4GV3vF3iLSAGq/zSwcRxmzKIqt+funEQUprGKVNbdMKZYWqG+USM YO6gSg1bxrMkd5l0E7kCxb5qwiNXAte7n/glc/mAq3QN/CEJLSJxta5Qil1eg1Rfl7Ax mEaQ== X-Gm-Message-State: AFqh2kpFumXHjODB7/3UDODvj35g212y/ZkP3SnaTAlXWv1kvvKP5MxX SLrAWOa7InA6EWvcNXCrU2eTlW0hZLhhFya7 X-Received: by 2002:a05:600c:5008:b0:3cf:6f4d:c25d with SMTP id n8-20020a05600c500800b003cf6f4dc25dmr45672643wmr.21.1673256410043; Mon, 09 Jan 2023 01:26:50 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j30-20020a05600c1c1e00b003d9f14e9085sm2167906wms.17.2023.01.09.01.26.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jan Kiszka , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , "Michael S. Tsirkin" , qemu-arm@nongnu.org, Eduardo Habkost , Markus Armbruster , Richard Henderson , Peter Maydell , Thomas Huth , Marcel Apfelbaum , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 6/9] hw/arm/musicpal: Convert TYPE_MUSICPAL_KEY from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:14 +0100 Message-Id: <20230109092617.80224-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109092617.80224-1-philmd@linaro.org> References: <20230109092617.80224-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Nothing in TYPE_MUSICPAL_KEY access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 13f4dbdbc3..b496ff8a22 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1068,7 +1068,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(musicpal_key_state, MUSICPAL_KEY) struct musicpal_key_state { /*< private >*/ - SysBusDevice parent_obj; + DeviceState parent_obj; /*< public >*/ uint32_t kbd_extended; @@ -1187,7 +1187,7 @@ static void musicpal_key_class_init(ObjectClass *klass, void *data) static const TypeInfo musicpal_key_info = { .name = TYPE_MUSICPAL_KEY, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(musicpal_key_state), .instance_init = musicpal_key_init, .class_init = musicpal_key_class_init, @@ -1301,7 +1301,7 @@ static void musicpal_init(MachineState *machine) i2c = (I2CBus *)qdev_get_child_bus(i2c_dev, "i2c"); lcd_dev = sysbus_create_simple(TYPE_MUSICPAL_LCD, MP_LCD_BASE, NULL); - key_dev = sysbus_create_simple(TYPE_MUSICPAL_KEY, -1, NULL); + key_dev = qdev_create_simple(TYPE_MUSICPAL_KEY, &error_fatal); /* I2C read data */ qdev_connect_gpio_out(i2c_dev, 0,