summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/upd7759.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/sound/upd7759.c')
-rw-r--r--src/emu/sound/upd7759.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c
index 7586b2faa92..fd14c537660 100644
--- a/src/emu/sound/upd7759.c
+++ b/src/emu/sound/upd7759.c
@@ -630,10 +630,7 @@ static SND_START( upd7759 )
{
static const upd7759_interface defintrf = { 0 };
const upd7759_interface *intf = (device->static_config != NULL) ? device->static_config : &defintrf;
- struct upd7759_chip *chip;
-
- chip = auto_malloc(sizeof(*chip));
- memset(chip, 0, sizeof(*chip));
+ struct upd7759_chip *chip = device->token;
chip->device = device;
@@ -666,7 +663,7 @@ static SND_START( upd7759 )
register_for_save(chip, device);
- return chip;
+ return DEVICE_START_OK;
}
@@ -792,6 +789,7 @@ SND_GET_INFO( upd7759 )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
+ case SNDINFO_INT_TOKEN_BYTES: info->i = sizeof(struct upd7759_chip); break;
/* --- the following bits of info are returned as pointers to data or functions --- */
case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( upd7759 ); break;