summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/ds1302.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/ds1302.c')
-rw-r--r--src/emu/machine/ds1302.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/emu/machine/ds1302.c b/src/emu/machine/ds1302.c
index 5932dc4cf0b..fdad770932f 100644
--- a/src/emu/machine/ds1302.c
+++ b/src/emu/machine/ds1302.c
@@ -47,9 +47,8 @@ struct _ds1302_state
INLINE ds1302_state *get_safe_token(running_device *device)
{
assert(device != NULL);
- assert(device->token != NULL);
- assert(device->type == DS1302);
- return (ds1302_state *)device->token;
+ assert(device->type() == DS1302);
+ return (ds1302_state *)downcast<legacy_device_base *>(device)->token();
}
INLINE UINT8 convert_to_bcd(int val)
@@ -225,5 +224,4 @@ static const char DEVTEMPLATE_SOURCE[] = __FILE__;
#define DEVTEMPLATE_FEATURES DT_HAS_START | DT_HAS_RESET
#define DEVTEMPLATE_NAME "Dallas DS1302 RTC"
#define DEVTEMPLATE_FAMILY "Dallas DS1302 RTC"
-#define DEVTEMPLATE_CLASS DEVICE_CLASS_PERIPHERAL
#include "devtempl.h"