summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/upd4701.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/upd4701.c')
-rw-r--r--src/emu/machine/upd4701.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/emu/machine/upd4701.c b/src/emu/machine/upd4701.c
index cf818e49984..27c8928305d 100644
--- a/src/emu/machine/upd4701.c
+++ b/src/emu/machine/upd4701.c
@@ -48,9 +48,8 @@ struct _upd4701_state
INLINE upd4701_state *get_safe_token(running_device *device)
{
assert(device != NULL);
- assert(device->token != NULL);
- assert((device->type == UPD4701));
- return (upd4701_state *)device->token;
+ assert((device->type() == UPD4701));
+ return (upd4701_state *)downcast<legacy_device_base *>(device)->token();
}
@@ -312,5 +311,4 @@ static const char DEVTEMPLATE_SOURCE[] = __FILE__;
#define DEVTEMPLATE_FEATURES DT_HAS_START | DT_HAS_RESET
#define DEVTEMPLATE_NAME "NEC uPD4701 Encoder"
#define DEVTEMPLATE_FAMILY "NEC uPD4701 Encoder"
-#define DEVTEMPLATE_CLASS DEVICE_CLASS_PERIPHERAL
#include "devtempl.h"