Introduce vmbus specific wrapper functions to set/get driver specific data.
Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Haiyang Zhang <[email protected]> --- 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 caa3a7b..91e557b 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) \ -- 1.7.4.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
