Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281031
b: refs/heads/master
c: 7f33f30
h: refs/heads/master
i:
  281029: fbed535
  281027: e574d6d
  281023: 33fb845
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent acd9e55 commit 1b6c852
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a00e8224c19fa5ba3007da00d850865cbefcaabd
refs/heads/master: 7f33f30a67cebbdaa938e34c5144424d2f0ce9cc
14 changes: 5 additions & 9 deletions trunk/drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,7 @@ static int storvsc_remove(struct hv_device *dev)
{
struct storvsc_device *stor_device = hv_get_drvdata(dev);
struct Scsi_Host *host = stor_device->host;
struct hv_host_device *host_dev =
(struct hv_host_device *)host->hostdata;
struct hv_host_device *host_dev = shost_priv(host);

scsi_remove_host(host);

Expand Down Expand Up @@ -1057,8 +1056,7 @@ static int storvsc_host_reset(struct hv_device *device)
*/
static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
{
struct hv_host_device *host_dev =
(struct hv_host_device *)scmnd->device->host->hostdata;
struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
struct hv_device *dev = host_dev->dev;

return storvsc_host_reset(dev);
Expand All @@ -1073,8 +1071,7 @@ static void storvsc_command_completion(struct hv_storvsc_request *request)
struct storvsc_cmd_request *cmd_request =
(struct storvsc_cmd_request *)request->context;
struct scsi_cmnd *scmnd = cmd_request->cmd;
struct hv_host_device *host_dev =
(struct hv_host_device *)scmnd->device->host->hostdata;
struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
void (*scsi_done_fn)(struct scsi_cmnd *);
struct scsi_sense_hdr sense_hdr;
struct vmscsi_request *vm_srb;
Expand Down Expand Up @@ -1144,8 +1141,7 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
void (*done)(struct scsi_cmnd *))
{
int ret;
struct hv_host_device *host_dev =
(struct hv_host_device *)scmnd->device->host->hostdata;
struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
struct hv_device *dev = host_dev->dev;
struct hv_storvsc_request *request;
struct storvsc_cmd_request *cmd_request;
Expand Down Expand Up @@ -1359,7 +1355,7 @@ static int storvsc_probe(struct hv_device *device,
if (!host)
return -ENOMEM;

host_dev = (struct hv_host_device *)host->hostdata;
host_dev = shost_priv(host);
memset(host_dev, 0, sizeof(struct hv_host_device));

host_dev->port = host->host_no;
Expand Down

0 comments on commit 1b6c852

Please sign in to comment.