diff options
author | Borislav Petkov <petkovbb@gmail.com> | 2008-08-18 15:40:03 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-08-18 15:40:03 -0400 |
commit | 3e636f78e5bbe95831e4d0071ee8f40b507e1cbd (patch) | |
tree | 18619a1ffab617023013c94c780898483ffad0ac /drivers/cdrom/viocd.c | |
parent | 1f49060adcc1817337af95392bdf8a6205abffa0 (diff) |
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/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 9d0dfe6e0d6..031e0e1a1a3 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -550,12 +550,19 @@ return_complete: | |||
550 | } | 550 | } |
551 | } | 551 | } |
552 | 552 | ||
553 | static int viocd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | ||
554 | void *arg) | ||
555 | { | ||
556 | return -EINVAL; | ||
557 | } | ||
558 | |||
553 | static struct cdrom_device_ops viocd_dops = { | 559 | static struct cdrom_device_ops viocd_dops = { |
554 | .open = viocd_open, | 560 | .open = viocd_open, |
555 | .release = viocd_release, | 561 | .release = viocd_release, |
556 | .media_changed = viocd_media_changed, | 562 | .media_changed = viocd_media_changed, |
557 | .lock_door = viocd_lock_door, | 563 | .lock_door = viocd_lock_door, |
558 | .generic_packet = viocd_packet, | 564 | .generic_packet = viocd_packet, |
565 | .audio_ioctl = viocd_audio_ioctl, | ||
559 | .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 | 566 | .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 |
560 | }; | 567 | }; |
561 | 568 | ||