In preparation for getting rid of the priv element from struct hv_driver,
introduce a function that maps a generic struct driver pointer to struct
storvsc_driver_object.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#include <linux/kernel.h>
#include "vstorage.h"
#include "vmbus_api.h"
+#include "vmbus.h"
/* Defines */
#define STORVSC_RING_BUFFER_SIZE (20*PAGE_SIZE)
return container_of(d, struct storvsc_driver_object, base);
}
+static inline
+struct storvsc_driver_object *drv_to_stordrv(struct device_driver *d)
+{
+ struct hv_driver *hvdrv = drv_to_hv_drv(d);
+ return hvdr_to_stordr(hvdrv);
+}
+
/* Interface */
int stor_vsc_on_device_add(struct hv_device *device,