diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 2f778c92b88b34aef0e51991c249a827030e9bcf..2e1ee63d107fd537c0f8493f61405ede7202d6da 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -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);