From patchwork Mon Jan 9 09:26:13 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: 640596 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2040612pvb; Mon, 9 Jan 2023 01:31:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXun2xnQHfIGKBWYBcqjEMG7Jjf+EnT+ceMHU+5rWjVRVoYg9KEJLeZYSzjNd85MfvuXpVHH X-Received: by 2002:ac8:6782:0:b0:3a8:2d7:af66 with SMTP id b2-20020ac86782000000b003a802d7af66mr99265427qtp.21.1673256686326; Mon, 09 Jan 2023 01:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256686; cv=none; d=google.com; s=arc-20160816; b=OVwxEXrFwAUwMfNRPTELnULtMJAtN5XAXDpLC3RB2vEbIIlx6lEhnQDNvb+5Z8k1Go MchUqfAvJMYZwes3z9mB02FYGDiP8zdVnd85J7iBH7fRtdFZkvkuX+vAzuUJC2glwxs/ BZ5bWmu40zTkNeI0z0imviaup3M25QqJZ7qJxGRF4SFEOC5nAVxmv7KXpCnWsQNZsR9o 4WWSiSGlGJvjEpwnzo0uy2QtjUEsCuTKHZkTvKn31TWW6hPM5lMXsYqCcuSfxmrFjcvh eZUg2z6B5GLiTELRE1V4PGez3AdeZ2x4IlY13yIBmgK2OkQWdAjjqJTuGo1VMQq4qXch 33hA== 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=tSzFCO6NQ+8ffmrsTTKi/Gp5LFSgKmeeId0+ZsrnMi8=; b=QHNGUV6cUs+a0+UrTTfzWJlqESX+LyjFsrag552ssUTCnmA3HqRMf9qk9/7pxbtF+F 5J2CBAoX5RBe0C3KIMCsnXdmLUIZ5YPEdJK0p+9dnl+YDKenIh39Me0EvNFsw0D687li icspOouew+iy6B9PXJhNJjX6aOpo2VAtJ+NA26DKz+qoOKWP3P94+iPFtPKjsgki5o1f BKcBigcaLMAyhKIQ9ayJ0+j2nussbvBApZWTjOhoO0LvlvsTWBILV1aOnoFfrGqUyYfx x0VaQerJ6aq8XdBndqAazqTDV81Wg4vmAAuFvLAQ1WJ3gr7du338fZnvrijMPXu6tz4C xbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NA4pyZmn; 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 h8-20020a05620a400800b006e07228ed51si4516624qko.99.2023.01.09.01.31.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:31:26 -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=NA4pyZmn; 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 1pEoQh-00042j-Ih; Mon, 09 Jan 2023 04:26:55 -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 1pEoQa-0003yl-TF for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:50 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQY-0005ST-0h for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:47 -0500 Received: by mail-wr1-x42b.google.com with SMTP id az7so7490393wrb.5 for ; Mon, 09 Jan 2023 01:26:45 -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=tSzFCO6NQ+8ffmrsTTKi/Gp5LFSgKmeeId0+ZsrnMi8=; b=NA4pyZmn8lwtpKLMWJt/dLIt57NJE11fKCEwfPFiR84zmGfxBXs5eBwzzx//MEZS8h 2tq8QUeTwZ8F1mK+osyn6jFfbQRTdWg+6B4fSaUQMaYaw0GPJ7EmBpakBdgIZbYnN9Od waX/Swm9YTTSVs6pBNRUZmKt5LyIALAWSn8ntfC/uJhVQblwxK2bEQ2eYrP4/PTlivkm 0aci5qiRF4NBa9V33voy71WEFS36+0CO3gXEjwU+YVWVuDPryA2qwf5G+HhiJOIQQCpG oi7ADqlnHtfNU4pLqts5KHwmUyQ75lfquo1hqrj5cmO+Vtz56bAHIBPzojhVI5ibFYtH +YQg== 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=tSzFCO6NQ+8ffmrsTTKi/Gp5LFSgKmeeId0+ZsrnMi8=; b=fAM2u2HbQcv0qcArRPLDo+Sl6n4MKozuPwbmO+6yqr+kWBfEmb6xEouGx6jclrAiJe 7h29Mdwcjp0D9nAN9fwWBzjiJBwhnEeCbLs4XNSIPWu7X4/Mf4/94l/1tQGUFraO9P/M 0hg+4gm5h1CcqXiIwBktZv++iA/WAMvY6RX97j4T1VjaS/iJfZ6n2SwGaT8ZBY6U/Biy sEeOa9VHQGV9Cd/Pj40cYJbR4O77CXggdoXYdMJcVj1WUAspkJhDEvnbhy/hSOk9YId6 mrgoq5oYcOdoKs3suIUm2l80EjHRtd9O1nPm2E1gHyktv54TPh9sE+WvEaiZUUYBPCYf T3QA== X-Gm-Message-State: AFqh2kr2QGfHBHGM5p8DDh5i9No18YJjrVVgS1JzU39OQtU4SmleDR4P FbdG+x3l/90kZW87NiGNtZjZsAYWpjtuE+6I X-Received: by 2002:adf:e80e:0:b0:242:368:7665 with SMTP id o14-20020adfe80e000000b0024203687665mr40647874wrm.60.1673256405038; Mon, 09 Jan 2023 01:26:45 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bp28-20020a5d5a9c000000b00273cd321a1bsm8092385wrb.107.2023.01.09.01.26.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:44 -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 5/9] hw/arm/palm: Convert TYPE_PALM_MISC_GPIO from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:13 +0100 Message-Id: <20230109092617.80224-6-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=ham 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 Drop the pointless PalmMiscGPIOState structure definition, since it defaults to the size of the parent's type. Nothing in TYPE_PALM_MISC_GPIO access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/palm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/arm/palm.c b/hw/arm/palm.c index 68e11dd1ec..912164e93f 100644 --- a/hw/arm/palm.c +++ b/hw/arm/palm.c @@ -134,10 +134,6 @@ static void palmte_button_event(void *opaque, int keycode) #define TYPE_PALM_MISC_GPIO "palm-misc-gpio" OBJECT_DECLARE_SIMPLE_TYPE(PalmMiscGPIOState, PALM_MISC_GPIO) -struct PalmMiscGPIOState { - SysBusDevice parent_obj; -}; - static void palmte_onoff_gpios(void *opaque, int line, int level) { switch (line) { @@ -174,8 +170,7 @@ static void palm_misc_gpio_init(Object *obj) static const TypeInfo palm_misc_gpio_info = { .name = TYPE_PALM_MISC_GPIO, - .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(PalmMiscGPIOState), + .parent = TYPE_DEVICE, .instance_init = palm_misc_gpio_init, /* * No class init required: device has no internal state so does not @@ -187,7 +182,7 @@ static void palmte_gpio_setup(struct omap_mpu_state_s *cpu) { DeviceState *misc_gpio; - misc_gpio = sysbus_create_simple(TYPE_PALM_MISC_GPIO, -1, NULL); + misc_gpio = qdev_create_simple(TYPE_PALM_MISC_GPIO, &error_fatal); omap_mmc_handlers(cpu->mmc, qdev_get_gpio_in(cpu->gpio, PALMTE_MMC_WP_GPIO),