summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/rtc65271.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/rtc65271.c')
-rw-r--r--src/emu/machine/rtc65271.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/emu/machine/rtc65271.c b/src/emu/machine/rtc65271.c
index acaebf0953c..0e584d32fb6 100644
--- a/src/emu/machine/rtc65271.c
+++ b/src/emu/machine/rtc65271.c
@@ -56,10 +56,9 @@ struct _rtc65271_state
INLINE rtc65271_state *get_safe_token(running_device *device)
{
assert(device != NULL);
- assert(device->token != NULL);
- assert(device->type == RTC65271);
+ assert(device->type() == RTC65271);
- return (rtc65271_state *)device->token;
+ return (rtc65271_state *)downcast<legacy_device_base *>(device)->token();
}
@@ -686,7 +685,7 @@ static TIMER_CALLBACK( rtc_end_update_callback )
static DEVICE_START( rtc65271 )
{
- rtc65271_config *config = (rtc65271_config *)device->baseconfig().inline_config;
+ rtc65271_config *config = (rtc65271_config *)downcast<const legacy_device_config_base &>(device->baseconfig()).inline_config();
rtc65271_state *state = get_safe_token(device);
state->update_timer = timer_alloc(device->machine, rtc_begin_update_callback, (void *)device);