aboutsummaryrefslogtreecommitdiff
path: root/hw/musicpal.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
commitcdbe40ca836624a474bf8378b78a715ded36178c (patch)
tree25f499586b74a30a975b331f1f038a3d1d55bb80 /hw/musicpal.c
parent697454eb8e2335c21e07b8cd0a7468d1c53bed08 (diff)
WM8750 qdev coversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/musicpal.c')
-rw-r--r--hw/musicpal.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c
index 538fb8ecdc..87dda0ce5c 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -235,7 +235,7 @@ typedef struct musicpal_audio_state {
unsigned int play_pos;
unsigned int last_free;
uint32_t clock_div;
- i2c_slave *wm;
+ DeviceState *wm;
} musicpal_audio_state;
static void audio_callback(void *opaque, int free_out, int free_in)
@@ -434,10 +434,7 @@ static i2c_interface *musicpal_audio_init(qemu_irq irq)
i2c->bus = i2c_init_bus();
i2c->current_addr = -1;
- s->wm = wm8750_init(i2c->bus);
- if (!s->wm)
- return NULL;
- i2c_set_slave_address(s->wm, MP_WM_ADDR);
+ s->wm = i2c_create_slave(i2c->bus, "wm8750", MP_WM_ADDR);
wm8750_data_req_set(s->wm, audio_callback, s);
iomemtype = cpu_register_io_memory(0, musicpal_audio_readfn,