Skip to content

Commit

Permalink
Staging: hv: vmbus: Introduce functions for setting and getting drive…
Browse files Browse the repository at this point in the history
…r 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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent ef52a81 commit ab101e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/staging/hv/hyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit ab101e8

Please sign in to comment.