mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 17:03:47 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ef52a81bf5
commit
ab101e86d0
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user