From c84c48c398455bb489fad3a04dbd8c652de85ce3 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Wed, 23 Mar 2011 10:50:31 -0700 Subject: [PATCH] --- yaml --- r: 248927 b: refs/heads/master c: 852c16dbdcf84d43803a4ccfa647cf2f2952afc9 h: refs/heads/master i: 248925: cc40b2d2869ee1bd5398d11c975e97fc81dddc29 248923: dd234ec4b434577db0630838ec91e1dc5afe114d 248919: e1ab96791e7931a329107845b033ac749d66128a 248911: e779f9615fabc7bae979ca3add35d1f71035e3b2 248895: a92d837385be670e31b2068d27b40a68e42df128 v: v3 --- [refs] | 2 +- trunk/drivers/staging/hv/storvsc.c | 14 -------------- trunk/drivers/staging/hv/storvsc_api.h | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index eff3d11e3155..8c1728c36852 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 834702f82ab8fe1ea5de5e464764d5ca2d326dbd +refs/heads/master: 852c16dbdcf84d43803a4ccfa647cf2f2952afc9 diff --git a/trunk/drivers/staging/hv/storvsc.c b/trunk/drivers/staging/hv/storvsc.c index 83d012bec325..357f5ddeb8a2 100644 --- a/trunk/drivers/staging/hv/storvsc.c +++ b/trunk/drivers/staging/hv/storvsc.c @@ -56,20 +56,6 @@ static inline void free_stor_device(struct storvsc_device *device) kfree(device); } -/* Get the stordevice object iff exists and its refcount > 1 */ -static inline struct storvsc_device *get_stor_device(struct hv_device *device) -{ - struct storvsc_device *stor_device; - - stor_device = (struct storvsc_device *)device->ext; - if (stor_device && atomic_read(&stor_device->ref_count) > 1) - atomic_inc(&stor_device->ref_count); - else - stor_device = NULL; - - return stor_device; -} - /* Get the stordevice object iff exists and its refcount > 0 */ static inline struct storvsc_device *must_get_stor_device( struct hv_device *device) diff --git a/trunk/drivers/staging/hv/storvsc_api.h b/trunk/drivers/staging/hv/storvsc_api.h index d985bbfe7621..4e6650712ba1 100644 --- a/trunk/drivers/staging/hv/storvsc_api.h +++ b/trunk/drivers/staging/hv/storvsc_api.h @@ -137,6 +137,21 @@ struct storvsc_device { struct storvsc_request_extension reset_request; }; + +/* Get the stordevice object iff exists and its refcount > 1 */ +static inline struct storvsc_device *get_stor_device(struct hv_device *device) +{ + struct storvsc_device *stor_device; + + stor_device = (struct storvsc_device *)device->ext; + if (stor_device && atomic_read(&stor_device->ref_count) > 1) + atomic_inc(&stor_device->ref_count); + else + stor_device = NULL; + + return stor_device; +} + /* Interface */ int stor_vsc_on_host_reset(struct hv_device *device);