summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/wd17xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/wd17xx.c')
-rw-r--r--src/emu/machine/wd17xx.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/emu/machine/wd17xx.c b/src/emu/machine/wd17xx.c
index b1e9b5e4beb..b0d19483609 100644
--- a/src/emu/machine/wd17xx.c
+++ b/src/emu/machine/wd17xx.c
@@ -1247,14 +1247,7 @@ void wd17xx_set_drive(device_t *device, UINT8 drive)
if (w->intf->floppy_drive_tags[drive] != NULL)
{
- if (device->owner() != NULL) {
- w->drive = device->owner()->subdevice(w->intf->floppy_drive_tags[drive]);
- if (w->drive == NULL) {
- w->drive = device->machine().device(w->intf->floppy_drive_tags[drive]);
- }
- }
- else
- w->drive = device->machine().device(w->intf->floppy_drive_tags[drive]);
+ w->drive = device->siblingdevice(w->intf->floppy_drive_tags[drive]);
}
}
@@ -2083,14 +2076,7 @@ static DEVICE_RESET( wd1770 )
if(w->intf->floppy_drive_tags[i]!=NULL) {
device_t *img = NULL;
- if (device->owner() != NULL)
- img = device->owner()->subdevice(w->intf->floppy_drive_tags[i]);
- if (img == NULL) {
- img = device->machine().device(w->intf->floppy_drive_tags[i]);
- }
-
- else
- img = device->machine().device(w->intf->floppy_drive_tags[i]);
+ img = device->siblingdevice(w->intf->floppy_drive_tags[i]);
if (img!=NULL) {
floppy_drive_set_controller(img,device);