It's only ever set to one function, so just call that function instead.
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
{
struct vmbus_channel *channel = context;
- VmbusChildDeviceRemove(channel->device_obj);
+ vmbus_child_device_unregister(channel->device_obj);
}
/*
"Releasing unattached device object %p",
channel->device_obj);
- VmbusChildDeviceRemove(channel->device_obj);
+ vmbus_child_device_unregister(channel->device_obj);
free_channel(channel);
} else {
if (!start)
return vmbusDriver->OnChildDeviceAdd(gDevice, ChildDevice);
}
-/*
- * VmbusChildDeviceRemove Unregisters the child device from the vmbus
- */
-void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
-{
- struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
-
- vmbusDriver->OnChildDeviceRemove(ChildDevice);
-}
-
/*
* VmbusOnDeviceAdd - Callback when the root bus device is added
*/
/* Set by the caller */
int (*OnChildDeviceAdd)(struct hv_device *RootDevice,
struct hv_device *ChildDevice);
- void (*OnChildDeviceRemove)(struct hv_device *device);
/* Set by the callee */
int (*OnIsr)(struct hv_driver *driver);
static int vmbus_child_device_register(struct hv_device *root_device_obj,
struct hv_device *child_device_obj);
-static void vmbus_child_device_unregister(struct hv_device *child_device_obj);
static ssize_t vmbus_show_device_attr(struct device *dev,
struct device_attribute *dev_attr,
char *buf);
* devices on the bus
*/
vmbus_drv_obj->OnChildDeviceAdd = vmbus_child_device_register;
- vmbus_drv_obj->OnChildDeviceRemove = vmbus_child_device_unregister;
/* Call to bus driver to initialize */
ret = drv_init(&vmbus_drv_obj->Base);
* vmbus_child_device_unregister - Remove the specified child device
* from the vmbus.
*/
-static void vmbus_child_device_unregister(struct hv_device *device_obj)
+void vmbus_child_device_unregister(struct hv_device *device_obj)
{
struct vm_device *device_ctx = to_vm_device(device_obj);
int VmbusChildDeviceAdd(struct hv_device *Device);
-void VmbusChildDeviceRemove(struct hv_device *Device);
+void vmbus_child_device_unregister(struct hv_device *device_obj);
/* static void */
/* VmbusChildDeviceDestroy( */