-
- ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg);
- if (ret != ENOSYS)
- return ret;
-
- /*
- * ENODEV means that we didn't recognise the ioctl, or that we
- * cannot execute it in the current device state. In either
- * case fall through to scsi_ioctl, which will return ENDOEV again
- * if it doesn't recognise the ioctl
- */
- ret = scsi_nonblockable_ioctl(sdev, cmd, argp, NULL);
- if (ret != -ENODEV)
- return ret;
- return scsi_ioctl(sdev, cmd, argp);
+ return cdrom_ioctl(file, &cd->cdi, inode, cmd, arg);