diff options
Diffstat (limited to 'drivers/s390/block/dasd_ioctl.c')
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index e3ad34686444..bb6caf46bbd9 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -448,7 +448,14 @@ dasd_ioctl(struct inode *inode, struct file *file, | |||
448 | case DASDAPIVER: | 448 | case DASDAPIVER: |
449 | return dasd_ioctl_api_version(argp); | 449 | return dasd_ioctl_api_version(argp); |
450 | default: | 450 | default: |
451 | /* resort to the deprecated dynamic ioctl list */ | 451 | /* if the discipline has an ioctl method try it. */ |
452 | if (device->discipline->ioctl) { | ||
453 | int rval = device->discipline->ioctl(device, cmd, argp); | ||
454 | if (rval != -ENOIOCTLCMD) | ||
455 | return rval; | ||
456 | } | ||
457 | |||
458 | /* else resort to the deprecated dynamic ioctl list */ | ||
452 | list_for_each_entry(ioctl, &dasd_ioctl_list, list) { | 459 | list_for_each_entry(ioctl, &dasd_ioctl_list, list) { |
453 | if (ioctl->no == cmd) { | 460 | if (ioctl->no == cmd) { |
454 | /* Found a matching ioctl. Call it. */ | 461 | /* Found a matching ioctl. Call it. */ |