*/
 #define SCSI_QUEUE_DELAY       3
 
-/*
- * Function:   scsi_unprep_request()
- *
- * Purpose:    Remove all preparation done for a request, including its
- *             associated scsi_cmnd, so that it can be requeued.
- *
- * Arguments:  req     - request to unprepare
- *
- * Lock status:        Assumed that no locks are held upon entry.
- *
- * Returns:    Nothing.
- */
-static void scsi_unprep_request(struct request *req)
-{
-       struct scsi_cmnd *cmd = req->special;
-
-       blk_unprep_request(req);
-       req->special = NULL;
-
-       scsi_put_command(cmd);
-       put_device(&cmd->device->sdev_gendev);
-}
-
 /**
  * __scsi_queue_insert - private queue insertion
  * @cmd: The SCSI command being requeued
        struct request *req = cmd->request;
        unsigned long flags;
 
-       /*
-        * We need to hold a reference on the device to avoid the queue being
-        * killed after the unlock and before scsi_run_queue is invoked which
-        * may happen because scsi_unprep_request() puts the command which
-        * releases its reference on the device.
-        */
-       get_device(&sdev->sdev_gendev);
-
        spin_lock_irqsave(q->queue_lock, flags);
-       scsi_unprep_request(req);
+       blk_unprep_request(req);
+       req->special = NULL;
+       scsi_put_command(cmd);
        blk_requeue_request(q, req);
        spin_unlock_irqrestore(q->queue_lock, flags);