diff options
author | Mao Zhongyi <maozhongyi@cmss.chinamobile.com> | 2018-10-22 15:40:49 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-10-29 13:50:15 +0100 |
commit | a8299ec1b243ea56c41648ca63b96930f2db118b (patch) | |
tree | dd76c25dbc012b4759d4e6edd5cf8c41fd5f3bff /hw/arm/musicpal.c | |
parent | a518333b15c69269e15025d0d6b7a921a6fc709e (diff) |
audio: use object link instead of qdev property to pass wm8750 reference
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 <jan.kiszka@web.de>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181022074050.19638-3-maozhongyi@cmss.chinamobile.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/arm/musicpal.c')
-rw-r--r-- | hw/arm/musicpal.c | 3 |
1 files changed, 2 insertions, 1 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 = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR); dev = qdev_create(NULL, "mv88w8618_audio"); s = 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]); |