linux-sg2042/drivers/cdrom
Alexander Inyukhin bce31b6748 cdrom: handle TOC
This patch should fix TOC handling for cdroms that can not play audio.  It
extends commit af744e3294 ("cdrom: don't
check CDC_PLAY_AUDIO in cdrom_count_tracks()") with a safety check and
non-audio ioctls support.

Since CDC_PLAY_AUDIO flag was used not only to check ability to play audio
but also to ensure that audio_ioctl was not NULL, all TOC-related
operations had to use it.

As far as I understand, now audio_ioctl is never NULL, so a sanity check
during device registration should be sufficient.

It was tested on Optiarc AD7203A device, that has no ability to play
audio.

Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[bart: remove now unneeded ->audio_ioctl check (noticed by Borislav)]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-18 21:40:04 +02:00
..
Makefile cdrom: Add support for Sega Dreamcast GD-ROM. 2008-01-28 13:19:04 +09:00
cdrom.c cdrom: handle TOC 2008-08-18 21:40:04 +02:00
gdrom.c gdrom: add dummy audio_ioctl handler 2008-08-18 21:40:04 +02:00
viocd.c viocd: add dummy audio ioctl handler 2008-08-18 21:40:03 +02:00