diff options
author | K. Y. Srinivasan | 2011-09-13 19:59:40 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-09-16 20:06:02 +0200 |
commit | ab101e86d0f2c00c11aec5b16e27246ccecb0870 (patch) | |
tree | 31afc65f3fe16f73a48be497ca5038c539ccf1a2 /drivers/staging/hv/hyperv.h | |
parent | Staging: hv: storvsc: Use the driver_data to identify ide (diff) | |
download | kernel-qcow2-linux-ab101e86d0f2c00c11aec5b16e27246ccecb0870.tar.gz kernel-qcow2-linux-ab101e86d0f2c00c11aec5b16e27246ccecb0870.tar.xz kernel-qcow2-linux-ab101e86d0f2c00c11aec5b16e27246ccecb0870.zip |
Staging: hv: vmbus: Introduce functions for setting and getting driver data
Introduce vmbus specific wrapper functions to set/get driver specific data.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/hyperv.h')
-rw-r--r-- | drivers/staging/hv/hyperv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h index caa3a7ba8376..91e557b2fd18 100644 --- a/drivers/staging/hv/hyperv.h +++ b/drivers/staging/hv/hyperv.h @@ -843,6 +843,15 @@ static inline struct hv_driver *drv_to_hv_drv(struct device_driver *d) return container_of(d, struct hv_driver, driver); } +static inline void hv_set_drvdata(struct hv_device *dev, void *data) +{ + dev_set_drvdata(&dev->device, data); +} + +static inline void *hv_get_drvdata(struct hv_device *dev) +{ + return dev_get_drvdata(&dev->device); +} /* Vmbus interface */ #define vmbus_driver_register(driver) \ |