From 39cb0e7ae794104a5126573f7110305d4af8c9cf Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Tue, 13 Sep 2011 10:59:46 -0700 Subject: [PATCH] --- yaml --- r: 268373 b: refs/heads/master c: a13d35ab9fdcc8e40af570039120a35179426c08 h: refs/heads/master i: 268371: 457dc357ca5adaa6c01b7078de931b7e1204097f v: v3 --- [refs] | 2 +- trunk/drivers/staging/hv/storvsc_drv.c | 24 ++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index 9f0072b4c238..8e05f926ab46 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e4198ce18859953019d8f32f71e3a7aa309b72d +refs/heads/master: a13d35ab9fdcc8e40af570039120a35179426c08 diff --git a/trunk/drivers/staging/hv/storvsc_drv.c b/trunk/drivers/staging/hv/storvsc_drv.c index 2210c8c8d68f..ce8652e3d740 100644 --- a/trunk/drivers/staging/hv/storvsc_drv.c +++ b/trunk/drivers/staging/hv/storvsc_drv.c @@ -332,23 +332,6 @@ static inline void storvsc_wait_to_drain(struct storvsc_device *dev) dev->drain_notify = false; } -static inline struct storvsc_device *alloc_stor_device(struct hv_device *device) -{ - struct storvsc_device *stor_device; - - stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL); - if (!stor_device) - return NULL; - - stor_device->destroy = false; - init_waitqueue_head(&stor_device->waiting_to_drain); - stor_device->device = device; - device->ext = stor_device; - - return stor_device; -} - - static inline struct storvsc_device *get_in_stor_device( struct hv_device *device) { @@ -1382,13 +1365,18 @@ static int storvsc_probe(struct hv_device *device, return -ENOMEM; } - stor_device = alloc_stor_device(device); + stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL); if (!stor_device) { kmem_cache_destroy(host_dev->request_pool); scsi_host_put(host); return -ENOMEM; } + stor_device->destroy = false; + init_waitqueue_head(&stor_device->waiting_to_drain); + stor_device->device = device; + device->ext = stor_device; + stor_device->port_number = host->host_no; ret = storvsc_connect_to_vsp(device, storvsc_ringbuffer_size); if (ret) {