Commit 3e636f78 authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

viocd: add dummy audio ioctl handler

Make sure audio_ioctl is always defined even if being a dummy function
since the cdrom_ioctl interface assumes its existence and we don't
want to BUG on null ptr on some ioctls like, e.g. CDROMREADTOCENTRY,
CDROMREADTOCHDR etc. when we fix CDC_PLAY_AUDIO checking in cdrom.c.
Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 1f49060a
...@@ -550,12 +550,19 @@ static void vio_handle_cd_event(struct HvLpEvent *event) ...@@ -550,12 +550,19 @@ static void vio_handle_cd_event(struct HvLpEvent *event)
} }
} }
static int viocd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
void *arg)
{
return -EINVAL;
}
static struct cdrom_device_ops viocd_dops = { static struct cdrom_device_ops viocd_dops = {
.open = viocd_open, .open = viocd_open,
.release = viocd_release, .release = viocd_release,
.media_changed = viocd_media_changed, .media_changed = viocd_media_changed,
.lock_door = viocd_lock_door, .lock_door = viocd_lock_door,
.generic_packet = viocd_packet, .generic_packet = viocd_packet,
.audio_ioctl = viocd_audio_ioctl,
.capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_MULTI_SESSION | CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_DRIVE_STATUS | CDC_GENERIC_PACKET | CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | CDC_DVD_RAM | CDC_RAM .capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_MULTI_SESSION | CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_DRIVE_STATUS | CDC_GENERIC_PACKET | CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | CDC_DVD_RAM | CDC_RAM
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment