From ab101e86d0f2c00c11aec5b16e27246ccecb0870 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Tue, 13 Sep 2011 10:59:40 -0700 Subject: [PATCH] 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 Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/hyperv.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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) \