|
@@ -48,7 +48,7 @@ struct vmbus_driver_context {
|
|
|
struct tasklet_struct event_dpc;
|
|
|
|
|
|
/* The bus root device */
|
|
|
- struct device_context device_ctx;
|
|
|
+ struct vm_device device_ctx;
|
|
|
};
|
|
|
|
|
|
static int vmbus_match(struct device *device, struct device_driver *driver);
|
|
@@ -136,7 +136,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
|
|
|
struct device_attribute *dev_attr,
|
|
|
char *buf)
|
|
|
{
|
|
|
- struct device_context *device_ctx = device_to_device_context(dev);
|
|
|
+ struct vm_device *device_ctx = device_to_vm_device(dev);
|
|
|
struct hv_device_info device_info;
|
|
|
|
|
|
memset(&device_info, 0, sizeof(struct hv_device_info));
|
|
@@ -246,7 +246,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
|
|
|
{
|
|
|
struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
|
|
|
struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
|
|
|
- struct device_context *dev_ctx = &g_vmbus_drv.device_ctx;
|
|
|
+ struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx;
|
|
|
int ret;
|
|
|
unsigned int vector;
|
|
|
|
|
@@ -308,7 +308,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
|
|
|
DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector);
|
|
|
|
|
|
/* Call to bus driver to add the root device */
|
|
|
- memset(dev_ctx, 0, sizeof(struct device_context));
|
|
|
+ memset(dev_ctx, 0, sizeof(struct vm_device));
|
|
|
|
|
|
ret = vmbus_drv_obj->Base.OnDeviceAdd(&dev_ctx->device_obj, &vector);
|
|
|
if (ret != 0) {
|
|
@@ -369,7 +369,7 @@ static void vmbus_bus_exit(void)
|
|
|
struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
|
|
|
struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
|
|
|
|
|
|
- struct device_context *dev_ctx = &g_vmbus_drv.device_ctx;
|
|
|
+ struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx;
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|
|
@@ -472,13 +472,13 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
|
|
|
struct hv_guid *instance,
|
|
|
void *context)
|
|
|
{
|
|
|
- struct device_context *child_device_ctx;
|
|
|
+ struct vm_device *child_device_ctx;
|
|
|
struct hv_device *child_device_obj;
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|
|
|
/* Allocate the new child device */
|
|
|
- child_device_ctx = kzalloc(sizeof(struct device_context), GFP_KERNEL);
|
|
|
+ child_device_ctx = kzalloc(sizeof(struct vm_device), GFP_KERNEL);
|
|
|
if (!child_device_ctx) {
|
|
|
DPRINT_ERR(VMBUS_DRV,
|
|
|
"unable to allocate device_context for child device");
|
|
@@ -527,10 +527,10 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
|
|
|
struct hv_device *child_device_obj)
|
|
|
{
|
|
|
int ret = 0;
|
|
|
- struct device_context *root_device_ctx =
|
|
|
- to_device_context(root_device_obj);
|
|
|
- struct device_context *child_device_ctx =
|
|
|
- to_device_context(child_device_obj);
|
|
|
+ struct vm_device *root_device_ctx =
|
|
|
+ to_vm_device(root_device_obj);
|
|
|
+ struct vm_device *child_device_ctx =
|
|
|
+ to_vm_device(child_device_obj);
|
|
|
static atomic_t device_num = ATOMIC_INIT(0);
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
@@ -573,7 +573,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
|
|
|
*/
|
|
|
static void vmbus_child_device_unregister(struct hv_device *device_obj)
|
|
|
{
|
|
|
- struct device_context *device_ctx = to_device_context(device_obj);
|
|
|
+ struct vm_device *device_ctx = to_vm_device(device_obj);
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|
|
@@ -611,7 +611,7 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
|
|
|
*/
|
|
|
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
|
|
|
{
|
|
|
- struct device_context *device_ctx = device_to_device_context(device);
|
|
|
+ struct vm_device *device_ctx = device_to_vm_device(device);
|
|
|
int ret;
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
@@ -688,7 +688,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
|
|
|
{
|
|
|
int match = 0;
|
|
|
struct driver_context *driver_ctx = driver_to_driver_context(driver);
|
|
|
- struct device_context *device_ctx = device_to_device_context(device);
|
|
|
+ struct vm_device *device_ctx = device_to_vm_device(device);
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|
|
@@ -725,7 +725,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
|
|
|
*/
|
|
|
static void vmbus_probe_failed_cb(struct work_struct *context)
|
|
|
{
|
|
|
- struct device_context *device_ctx = (struct device_context *)context;
|
|
|
+ struct vm_device *device_ctx = (struct vm_device *)context;
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|
|
@@ -747,8 +747,8 @@ static int vmbus_probe(struct device *child_device)
|
|
|
int ret = 0;
|
|
|
struct driver_context *driver_ctx =
|
|
|
driver_to_driver_context(child_device->driver);
|
|
|
- struct device_context *device_ctx =
|
|
|
- device_to_device_context(child_device);
|
|
|
+ struct vm_device *device_ctx =
|
|
|
+ device_to_vm_device(child_device);
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|
|
@@ -872,7 +872,7 @@ static void vmbus_bus_release(struct device *device)
|
|
|
*/
|
|
|
static void vmbus_device_release(struct device *device)
|
|
|
{
|
|
|
- struct device_context *device_ctx = device_to_device_context(device);
|
|
|
+ struct vm_device *device_ctx = device_to_vm_device(device);
|
|
|
|
|
|
DPRINT_ENTER(VMBUS_DRV);
|
|
|
|