Commit d15cad5d authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

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: default avatarBorislav Petkov <petkovbb@gmail.com>
Acked-by: default avatarAdrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 3e636f78
...@@ -471,6 +471,12 @@ static int gdrom_getsense(short *bufstring) ...@@ -471,6 +471,12 @@ static int gdrom_getsense(short *bufstring)
return err; 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 = { static struct cdrom_device_ops gdrom_ops = {
.open = gdrom_open, .open = gdrom_open,
.release = gdrom_release, .release = gdrom_release,
...@@ -478,6 +484,7 @@ static struct cdrom_device_ops gdrom_ops = { ...@@ -478,6 +484,7 @@ static struct cdrom_device_ops gdrom_ops = {
.media_changed = gdrom_mediachanged, .media_changed = gdrom_mediachanged,
.get_last_session = gdrom_get_last_session, .get_last_session = gdrom_get_last_session,
.reset = gdrom_hardreset, .reset = gdrom_hardreset,
.audio_ioctl = gdrom_audio_ioctl,
.capability = CDC_MULTI_SESSION | CDC_MEDIA_CHANGED | .capability = CDC_MULTI_SESSION | CDC_MEDIA_CHANGED |
CDC_RESET | CDC_DRIVE_STATUS | CDC_CD_R, CDC_RESET | CDC_DRIVE_STATUS | CDC_CD_R,
.n_minors = 1, .n_minors = 1,
......
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