audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string
Cc: Jan Kiszka <jan.kiszka@web.de> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20181022074050.19638-4-maozhongyi@cmss.chinamobile.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
a8299ec1b2
commit
d436d4e7a5
@ -1693,7 +1693,7 @@ static void musicpal_init(MachineState *machine)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
|
wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
|
||||||
dev = qdev_create(NULL, "mv88w8618_audio");
|
dev = qdev_create(NULL, TYPE_MV88W8618_AUDIO);
|
||||||
s = SYS_BUS_DEVICE(dev);
|
s = SYS_BUS_DEVICE(dev);
|
||||||
object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev),
|
object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev),
|
||||||
TYPE_WM8750, NULL);
|
TYPE_WM8750, NULL);
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
#define MP_AUDIO_CLOCK_24MHZ (1 << 9)
|
#define MP_AUDIO_CLOCK_24MHZ (1 << 9)
|
||||||
#define MP_AUDIO_MONO (1 << 14)
|
#define MP_AUDIO_MONO (1 << 14)
|
||||||
|
|
||||||
#define TYPE_MV88W8618_AUDIO "mv88w8618_audio"
|
|
||||||
#define MV88W8618_AUDIO(obj) \
|
#define MV88W8618_AUDIO(obj) \
|
||||||
OBJECT_CHECK(mv88w8618_audio_state, (obj), TYPE_MV88W8618_AUDIO)
|
OBJECT_CHECK(mv88w8618_audio_state, (obj), TYPE_MV88W8618_AUDIO)
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
|
|
||||||
#define TYPE_WM8750 "wm8750"
|
#define TYPE_WM8750 "wm8750"
|
||||||
|
#define TYPE_MV88W8618_AUDIO "mv88w8618_audio"
|
||||||
|
|
||||||
typedef void data_req_cb(void *opaque, int free_out, int free_in);
|
typedef void data_req_cb(void *opaque, int free_out, int free_in);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user