[PATCH] ide-cd: clear random-write capability it not supported
authorAndrey Borzenkov <arvidjaar@mail.ru>
Tue, 10 Jan 2006 10:27:00 +0000 (11:27 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 16:38:19 +0000 (08:38 -0800)
Add CDC-RAM to capability mask. This prevents udev incorrectly reporting
RAM capabilities for device.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ide/ide-cd.c

index e4d55ad32d2f49da3e2e14b0a457566f4679570c..9b2ebd219ad0d0fc8c8aabf83c60fc1b99548d1f 100644 (file)
@@ -2895,6 +2895,8 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
                devinfo->mask |= CDC_CLOSE_TRAY;
        if (!CDROM_CONFIG_FLAGS(drive)->mo_drive)
                devinfo->mask |= CDC_MO_DRIVE;
+       if (!CDROM_CONFIG_FLAGS(drive)->ram)
+               devinfo->mask |= CDC_RAM;
 
        devinfo->disk = info->disk;
        return register_cdrom(devinfo);