Staging: hv: storvsc: Rename the context field in hv_storvsc_request
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 12 Jan 2012 20:38:02 +0000 (12:38 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 01:07:37 +0000 (17:07 -0800)
Rename the context field in hv_storvsc_request. As part of this change
fix the type of this field.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/hv/storvsc_drv.c

index 7c9fa19c9e553f0e9ba23d27c11af69558cc80e5..051570777c00bf2728a0c298aeb93b54bba8d568 100644 (file)
@@ -275,7 +275,7 @@ struct hv_storvsc_request {
        struct completion wait_event;
 
        unsigned char *sense_buffer;
-       void *context;
+       struct storvsc_cmd_request  *cmd;
        struct hv_multipage_buffer data_buffer;
 
        struct vstor_packet vstor_packet;
@@ -785,8 +785,7 @@ cleanup:
 
 static void storvsc_command_completion(struct hv_storvsc_request *request)
 {
-       struct storvsc_cmd_request *cmd_request =
-               (struct storvsc_cmd_request *)request->context;
+       struct storvsc_cmd_request *cmd_request = request->cmd;
        struct scsi_cmnd *scmnd = cmd_request->cmd;
        struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
        void (*scsi_done_fn)(struct scsi_cmnd *);
@@ -1315,7 +1314,7 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
                break;
        }
 
-       request->context = cmd_request;/* scmnd; */
+       request->cmd = cmd_request;
 
        vm_srb->port_number = host_dev->port;
        vm_srb->path_id = scmnd->device->channel;