From nobody Thu Nov 6 08:14:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540820397227599.8916930363235; Mon, 29 Oct 2018 06:39:57 -0700 (PDT) Received: from localhost ([::1]:45640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7ls-0004I7-3q for importer@patchew.org; Mon, 29 Oct 2018 09:39:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7jw-0001Ou-Vy for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gH7jv-0004gs-BE for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55404) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gH7jk-0004Vd-1Y; Mon, 29 Oct 2018 09:37:44 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 59ED6AD899; Mon, 29 Oct 2018 13:37:34 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FB4C608FA; Mon, 29 Oct 2018 13:37:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A4007B3E01; Mon, 29 Oct 2018 14:37:22 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2018 14:37:19 +0100 Message-Id: <20181029133722.12415-2-kraxel@redhat.com> In-Reply-To: <20181029133722.12415-1-kraxel@redhat.com> References: <20181029133722.12415-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 29 Oct 2018 13:37:34 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/4] hw: AC97: make it more QOMconventional X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, Jan Kiszka , Gerd Hoffmann , Li Qiang Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Li Qiang Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20181013060809.52496-1-liq3ea@163.com Signed-off-by: Gerd Hoffmann --- hw/audio/ac97.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 337402e9c6..d799533aa9 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -123,6 +123,10 @@ enum { =20 #define MUTE_SHIFT 15 =20 +#define TYPE_AC97 "AC97" +#define AC97(obj) \ + OBJECT_CHECK(AC97LinkState, (obj), TYPE_AC97) + #define REC_MASK 7 enum { REC_MIC =3D 0, @@ -1340,7 +1344,7 @@ static void ac97_on_reset (DeviceState *dev) =20 static void ac97_realize(PCIDevice *dev, Error **errp) { - AC97LinkState *s =3D DO_UPCAST (AC97LinkState, dev, dev); + AC97LinkState *s =3D AC97(dev); uint8_t *c =3D s->dev.config; =20 /* TODO: no need to override */ @@ -1389,7 +1393,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp) =20 static void ac97_exit(PCIDevice *dev) { - AC97LinkState *s =3D DO_UPCAST(AC97LinkState, dev, dev); + AC97LinkState *s =3D AC97(dev); =20 AUD_close_in(&s->card, s->voice_pi); AUD_close_out(&s->card, s->voice_po); @@ -1399,7 +1403,7 @@ static void ac97_exit(PCIDevice *dev) =20 static int ac97_init (PCIBus *bus) { - pci_create_simple (bus, -1, "AC97"); + pci_create_simple(bus, -1, TYPE_AC97); return 0; } =20 @@ -1427,7 +1431,7 @@ static void ac97_class_init (ObjectClass *klass, void= *data) } =20 static const TypeInfo ac97_info =3D { - .name =3D "AC97", + .name =3D TYPE_AC97, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof (AC97LinkState), .class_init =3D ac97_class_init, --=20 2.9.3 From nobody Thu Nov 6 08:14:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540820714304104.53741593177415; Mon, 29 Oct 2018 06:45:14 -0700 (PDT) Received: from localhost ([::1]:45672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7qz-0001KQ-4h for importer@patchew.org; Mon, 29 Oct 2018 09:45:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7js-0001GF-Ra for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gH7jn-0004ew-PH for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55492) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gH7jg-0004WE-Fz; Mon, 29 Oct 2018 09:37:41 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45AA5AD886; Mon, 29 Oct 2018 13:37:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2CF75B697; Mon, 29 Oct 2018 13:37:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id ADD56B3E02; Mon, 29 Oct 2018 14:37:22 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2018 14:37:20 +0100 Message-Id: <20181029133722.12415-3-kraxel@redhat.com> In-Reply-To: <20181029133722.12415-1-kraxel@redhat.com> References: <20181029133722.12415-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 29 Oct 2018 13:37:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/4] audio: use TYPE_WM8750 instead of a hardcoded string X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, Jan Kiszka , Gerd Hoffmann , Mao Zhongyi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Mao Zhongyi Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20181022074050.19638-2-maozhongyi@cmss.chinamobile.com Signed-off-by: Gerd Hoffmann --- hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index c807010e83..3dafb41b0b 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1695,7 +1695,7 @@ static void musicpal_init(MachineState *machine) wm8750_dev =3D i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR); dev =3D qdev_create(NULL, "mv88w8618_audio"); s =3D SYS_BUS_DEVICE(dev); - qdev_prop_set_ptr(dev, "wm8750", wm8750_dev); + qdev_prop_set_ptr(dev, TYPE_WM8750, wm8750_dev); qdev_init_nofail(dev); sysbus_mmio_map(s, 0, MP_AUDIO_BASE); sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]); diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index e546892d3c..cf6ce6979b 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -280,7 +280,7 @@ static const VMStateDescription mv88w8618_audio_vmsd = =3D { }; =20 static Property mv88w8618_audio_properties[] =3D { - DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm), + DEFINE_PROP_PTR(TYPE_WM8750, mv88w8618_audio_state, wm), {/* end of list */}, }; =20 --=20 2.9.3 From nobody Thu Nov 6 08:14:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540820553367299.1830067665252; Mon, 29 Oct 2018 06:42:33 -0700 (PDT) Received: from localhost ([::1]:45655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7oH-0006E9-S5 for importer@patchew.org; Mon, 29 Oct 2018 09:42:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7jo-00019Z-U0 for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gH7jn-0004f0-PO for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62633) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gH7ji-0004WA-5O; Mon, 29 Oct 2018 09:37:44 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33D4630A480F; Mon, 29 Oct 2018 13:37:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id A12B05B687; Mon, 29 Oct 2018 13:37:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B6D0916444B; Mon, 29 Oct 2018 14:37:22 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2018 14:37:21 +0100 Message-Id: <20181029133722.12415-4-kraxel@redhat.com> In-Reply-To: <20181029133722.12415-1-kraxel@redhat.com> References: <20181029133722.12415-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 29 Oct 2018 13:37:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/4] audio: use object link instead of qdev property to pass wm8750 reference X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, Jan Kiszka , Gerd Hoffmann , Mao Zhongyi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Mao Zhongyi According to qdev-properties.h, properties of pointer type should be avoided, it seems a link type property is a good substitution. Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20181022074050.19638-3-maozhongyi@cmss.chinamobile.com Signed-off-by: Gerd Hoffmann --- hw/arm/musicpal.c | 3 ++- hw/audio/marvell_88w8618.c | 13 ++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 3dafb41b0b..ac266f9253 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1695,7 +1695,8 @@ static void musicpal_init(MachineState *machine) wm8750_dev =3D i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR); dev =3D qdev_create(NULL, "mv88w8618_audio"); s =3D SYS_BUS_DEVICE(dev); - qdev_prop_set_ptr(dev, TYPE_WM8750, wm8750_dev); + object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev), + TYPE_WM8750, NULL); qdev_init_nofail(dev); sysbus_mmio_map(s, 0, MP_AUDIO_BASE); sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]); diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index cf6ce6979b..1c7080e844 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -15,6 +15,7 @@ #include "hw/i2c/i2c.h" #include "hw/audio/wm8750.h" #include "audio/audio.h" +#include "qapi/error.h" =20 #define MP_AUDIO_SIZE 0x00001000 =20 @@ -252,6 +253,11 @@ static void mv88w8618_audio_init(Object *obj) memory_region_init_io(&s->iomem, obj, &mv88w8618_audio_ops, s, "audio", MP_AUDIO_SIZE); sysbus_init_mmio(dev, &s->iomem); + + object_property_add_link(OBJECT(dev), "wm8750", TYPE_WM8750, + (Object **) &s->wm, + qdev_prop_allow_set_link_before_realize, + 0, &error_abort); } =20 static void mv88w8618_audio_realize(DeviceState *dev, Error **errp) @@ -279,11 +285,6 @@ static const VMStateDescription mv88w8618_audio_vmsd = =3D { } }; =20 -static Property mv88w8618_audio_properties[] =3D { - DEFINE_PROP_PTR(TYPE_WM8750, mv88w8618_audio_state, wm), - {/* end of list */}, -}; - static void mv88w8618_audio_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -291,8 +292,6 @@ static void mv88w8618_audio_class_init(ObjectClass *kla= ss, void *data) dc->realize =3D mv88w8618_audio_realize; dc->reset =3D mv88w8618_audio_reset; dc->vmsd =3D &mv88w8618_audio_vmsd; - dc->props =3D mv88w8618_audio_properties; - /* Reason: pointer property "wm8750" */ dc->user_creatable =3D false; } =20 --=20 2.9.3 From nobody Thu Nov 6 08:14:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 154082037524190.68214309002133; Mon, 29 Oct 2018 06:39:35 -0700 (PDT) Received: from localhost ([::1]:45637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7lW-0003Cv-2X for importer@patchew.org; Mon, 29 Oct 2018 09:39:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH7jk-00014y-39 for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gH7jg-0004Zv-8r for qemu-devel@nongnu.org; Mon, 29 Oct 2018 09:37:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51018) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gH7jW-0004SH-3q; Mon, 29 Oct 2018 09:37:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B0A5531129E1; Mon, 29 Oct 2018 13:37:27 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id A113F5DD7E; Mon, 29 Oct 2018 13:37:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C34A216444D; Mon, 29 Oct 2018 14:37:22 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2018 14:37:22 +0100 Message-Id: <20181029133722.12415-5-kraxel@redhat.com> In-Reply-To: <20181029133722.12415-1-kraxel@redhat.com> References: <20181029133722.12415-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 29 Oct 2018 13:37:27 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/4] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Mao Zhongyi , qemu-arm@nongnu.org, Jan Kiszka , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Mao Zhongyi Cc: Jan Kiszka Cc: Philippe Mathieu-Daud=C3=A9 Cc: Peter Maydell Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20181022074050.19638-4-maozhongyi@cmss.chinamobile.com Signed-off-by: Gerd Hoffmann --- include/hw/audio/wm8750.h | 1 + hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/audio/wm8750.h b/include/hw/audio/wm8750.h index 84e7a119bb..e12cb886d1 100644 --- a/include/hw/audio/wm8750.h +++ b/include/hw/audio/wm8750.h @@ -17,6 +17,7 @@ #include "hw/hw.h" =20 #define TYPE_WM8750 "wm8750" +#define TYPE_MV88W8618_AUDIO "mv88w8618_audio" =20 typedef void data_req_cb(void *opaque, int free_out, int free_in); =20 diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index ac266f9253..9648b3af44 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1693,7 +1693,7 @@ static void musicpal_init(MachineState *machine) } =20 wm8750_dev =3D i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR); - dev =3D qdev_create(NULL, "mv88w8618_audio"); + dev =3D qdev_create(NULL, TYPE_MV88W8618_AUDIO); s =3D SYS_BUS_DEVICE(dev); object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev), TYPE_WM8750, NULL); diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index 1c7080e844..6600ab4851 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -39,7 +39,6 @@ #define MP_AUDIO_CLOCK_24MHZ (1 << 9) #define MP_AUDIO_MONO (1 << 14) =20 -#define TYPE_MV88W8618_AUDIO "mv88w8618_audio" #define MV88W8618_AUDIO(obj) \ OBJECT_CHECK(mv88w8618_audio_state, (obj), TYPE_MV88W8618_AUDIO) =20 --=20 2.9.3