From d15cad5df1dac17ae33152646f599f0bdc6be48e Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Mon, 18 Aug 2008 21:40:04 +0200 Subject: gdrom: 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 Acked-by: Adrian McMenamin Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/cdrom/gdrom.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/cdrom/gdrom.c') diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 1e0455bd6df..1231d95aa69 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c @@ -471,6 +471,12 @@ cleanup_sense_final: return err; } +static int gdrom_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, + void *arg) +{ + return -EINVAL; +} + static struct cdrom_device_ops gdrom_ops = { .open = gdrom_open, .release = gdrom_release, @@ -478,6 +484,7 @@ static struct cdrom_device_ops gdrom_ops = { .media_changed = gdrom_mediachanged, .get_last_session = gdrom_get_last_session, .reset = gdrom_hardreset, + .audio_ioctl = gdrom_audio_ioctl, .capability = CDC_MULTI_SESSION | CDC_MEDIA_CHANGED | CDC_RESET | CDC_DRIVE_STATUS | CDC_CD_R, .n_minors = 1, -- cgit v1.2.3-70-g09d2