From a62182f338b39a22035531c6afc0a8d2928b1df2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 2 Oct 2014 14:39:55 +0200 Subject: scsi: provide a generic change_queue_type method Most drivers use exactly the same implementation, so provide it as a library function. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Mike Christie Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- drivers/scsi/esas2r/esas2r_main.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'drivers/scsi/esas2r/esas2r_main.c') diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 45aa684f8b74..be09c628d034 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c @@ -258,7 +258,7 @@ static struct scsi_host_template driver_template = { .slave_alloc = esas2r_slave_alloc, .slave_destroy = esas2r_slave_destroy, .change_queue_depth = esas2r_change_queue_depth, - .change_queue_type = esas2r_change_queue_type, + .change_queue_type = scsi_change_queue_type, .max_sectors = 0xFFFF, }; @@ -1268,24 +1268,6 @@ int esas2r_change_queue_depth(struct scsi_device *dev, int depth, int reason) return dev->queue_depth; } -int esas2r_change_queue_type(struct scsi_device *dev, int type) -{ - esas2r_log(ESAS2R_LOG_INFO, "change_queue_type %p, %d", dev, type); - - if (dev->tagged_supported) { - scsi_set_tag_type(dev, type); - - if (type) - scsi_activate_tcq(dev, dev->queue_depth); - else - scsi_deactivate_tcq(dev, dev->queue_depth); - } else { - type = 0; - } - - return type; -} - int esas2r_slave_alloc(struct scsi_device *dev) { return 0; -- cgit v1.2.3