audio: use TYPE_WM8750 instead of a hardcoded string

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-2-maozhongyi@cmss.chinamobile.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Mao Zhongyi 2018-10-22 15:40:48 +08:00 committed by Gerd Hoffmann
parent 417d430eb3
commit a518333b15
2 changed files with 2 additions and 2 deletions

View File

@ -1695,7 +1695,7 @@ 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, "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]);

View File

@ -280,7 +280,7 @@ static const VMStateDescription mv88w8618_audio_vmsd = {
};
static Property mv88w8618_audio_properties[] = {
DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm),
DEFINE_PROP_PTR(TYPE_WM8750, mv88w8618_audio_state, wm),
{/* end of list */},
};