Staging: hv: vmbus: Introduce functions for setting and getting driver data
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 13 Sep 2011 17:59:40 +0000 (10:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 18:06:02 +0000 (20:06 +0200)
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>
drivers/staging/hv/hyperv.h

index caa3a7ba83764b998fa95d9cb337e0f5e2f8323a..91e557b2fd18bc429a7ea3a5d416daae210cf734 100644 (file)
@@ -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)  \