device_find_child_by_tag() -> device->subdevice()

This commit is contained in:
Aaron Giles 2010-01-17 15:50:08 +00:00
parent de7db8ada6
commit 4ec052a035
3 changed files with 7 additions and 30 deletions

View File

@ -54,7 +54,7 @@ void devcb_resolve_read_line(devcb_resolved_read_line *resolved, const devcb_rea
const device_config *cpu;
if (device->owner != NULL)
cpu = device_find_child_by_tag(device->owner, config->tag);
cpu = device->owner->subdevice(config->tag);
else
cpu = device->machine->device(config->tag);
@ -75,7 +75,7 @@ void devcb_resolve_read_line(devcb_resolved_read_line *resolved, const devcb_rea
if (config->type == DEVCB_TYPE_SELF)
resolved->target = device;
else if (device->owner != NULL)
resolved->target = device_find_child_by_tag(device->owner, config->tag);
resolved->target = device->owner->subdevice(config->tag);
else
resolved->target = device->machine->device(config->tag);
@ -141,7 +141,7 @@ void devcb_resolve_write_line(devcb_resolved_write_line *resolved, const devcb_w
const device_config *cpu;
if (device->owner != NULL)
cpu = device_find_child_by_tag(device->owner, config->tag);
cpu = device->owner->subdevice(config->tag);
else
cpu = device->machine->device(config->tag);
@ -162,7 +162,7 @@ void devcb_resolve_write_line(devcb_resolved_write_line *resolved, const devcb_w
const device_config *cpu;
if (device->owner != NULL)
cpu = device_find_child_by_tag(device->owner, config->tag);
cpu = device->owner->subdevice(config->tag);
else
cpu = device->machine->device(config->tag);
@ -181,7 +181,7 @@ void devcb_resolve_write_line(devcb_resolved_write_line *resolved, const devcb_w
if (config->type == DEVCB_TYPE_SELF)
resolved->target = device;
else if (device->owner != NULL)
resolved->target = device_find_child_by_tag(device->owner, config->tag);
resolved->target = device->owner->subdevice(config->tag);
else
resolved->target = device->machine->device(config->tag);
@ -241,7 +241,7 @@ void devcb_resolve_read8(devcb_resolved_read8 *resolved, const devcb_read8 *conf
const device_config *cpu;
if (device->owner != NULL)
cpu = device_find_child_by_tag(device->owner, config->tag);
cpu = device->owner->subdevice(config->tag);
else
cpu = device->machine->device(config->tag);
@ -312,7 +312,7 @@ void devcb_resolve_write8(devcb_resolved_write8 *resolved, const devcb_write8 *c
const device_config *cpu;
if (device->owner != NULL)
cpu = device_find_child_by_tag(device->owner, config->tag);
cpu = device->owner->subdevice(config->tag);
else
cpu = device->machine->device(config->tag);

View File

@ -324,22 +324,6 @@ device_config *device_list::find(device_class devclass, int index) const
/*-------------------------------------------------
device_find_child_by_tag - retrieve a child
device configuration based on a tag
-------------------------------------------------*/
const device_config *device_find_child_by_tag(const device_config *owner, const char *tag)
{
assert(owner != NULL);
assert(tag != NULL);
astring tempstring;
return owner->machine->config->devicelist.find(device_build_tag(tempstring, owner, tag));
}
/***************************************************************************
LIVE DEVICE MANAGEMENT
***************************************************************************/

View File

@ -414,13 +414,6 @@ const device_contract *device_get_contract(const device_config *device, const ch
/* ----- type-based device access ----- */
/* retrieve a child device configuration based on a tag */
const device_config *device_find_child_by_tag(const device_config *owner, const char *tag);
/* ----- live device management ----- */
/* "attach" a running_machine to its list of devices */