From fd2eb9034e48cdca358dc06a833a736e7c6f68dd Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 18 Jul 2014 16:59:19 +0200 Subject: scsi: move the writeable field from struct scsi_device to struct scsi_cd We currently set the field in common code based on the device type, but then only use it in the cdrom driver which also overrides the value previously set in the generic code. Just leave this entirely to the CDROM driver to make everyones life simpler. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen --- drivers/scsi/sd.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/scsi/sd.c') diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 3663e38ba4df..377a5206017e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -992,9 +992,6 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt) } } if (rq_data_dir(rq) == WRITE) { - if (!sdp->writeable) { - goto out; - } SCpnt->cmnd[0] = WRITE_6; if (blk_integrity_rq(rq)) -- cgit v1.2.3-55-g7522