Commit 21b99865 authored by Stefan Meyknecht's avatar Stefan Meyknecht Committed by Linus Torvalds

[PATCH] cdrom: MO-drive open write fix

This trivial fix allows mounting MO-drives readwrite.

Acked by Jens.
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 064c7c35
......@@ -833,8 +833,11 @@ static int cdrom_open_write(struct cdrom_device_info *cdi)
if (!cdrom_is_mrw(cdi, &mrw_write))
mrw = 1;
(void) cdrom_is_random_writable(cdi, &ram_write);
if (CDROM_CAN(CDC_MO_DRIVE))
ram_write = 1;
else
(void) cdrom_is_random_writable(cdi, &ram_write);
if (mrw)
cdi->mask &= ~CDC_MRW;
else
......@@ -855,7 +858,7 @@ static int cdrom_open_write(struct cdrom_device_info *cdi)
else if (CDROM_CAN(CDC_DVD_RAM))
ret = cdrom_dvdram_open_write(cdi);
else if (CDROM_CAN(CDC_RAM) &&
!CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_MRW))
!CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_MRW|CDC_MO_DRIVE))
ret = cdrom_ram_open_write(cdi);
else if (CDROM_CAN(CDC_MO_DRIVE))
ret = mo_open_write(cdi);
......
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