From: Andrey Borzenkov Date: Tue, 10 Jan 2006 10:27:00 +0000 (+0100) Subject: [PATCH] ide-cd: clear random-write capability it not supported X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0400dc507a4345357fc25f13e8ac929287688a8;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] ide-cd: clear random-write capability it not supported Add CDC-RAM to capability mask. This prevents udev incorrectly reporting RAM capabilities for device. Signed-off-by: Andrey Borzenkov Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index e4d55ad32d2f..9b2ebd219ad0 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -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);