summaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2008-08-18 21:40:03 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-08-18 21:40:03 +0200
commit3e636f78e5bbe95831e4d0071ee8f40b507e1cbd (patch)
tree18619a1ffab617023013c94c780898483ffad0ac /drivers/cdrom
parentcleanup powerpc/include/asm/ide.h (diff)
downloadlinux-3e636f78e5bbe95831e4d0071ee8f40b507e1cbd.tar.xz
linux-3e636f78e5bbe95831e4d0071ee8f40b507e1cbd.zip
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: Borislav Petkov <petkovbb@gmail.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r--drivers/cdrom/viocd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 9d0dfe6e0d63..031e0e1a1a3b 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -550,12 +550,19 @@ return_complete:
}
}
+static int viocd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
+ void *arg)
+{
+ return -EINVAL;
+}
+
static struct cdrom_device_ops viocd_dops = {
.open = viocd_open,
.release = viocd_release,
.media_changed = viocd_media_changed,
.lock_door = viocd_lock_door,
.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
};