Staging: hv: remove OnChildDeviceRemove vmbus_driver callback
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 2 Dec 2010 16:34:45 +0000 (08:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 2 Dec 2010 16:34:45 +0000 (08:34 -0800)
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>
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/vmbus.c
drivers/staging/hv/vmbus_api.h
drivers/staging/hv/vmbus_drv.c
drivers/staging/hv/vmbus_private.h

index 3105fd1afe7dac3db95ec5aca47c805adb6ca9fd..0f4d6093f674ca1170b48126ac5e518fab4a8751 100644 (file)
@@ -413,7 +413,7 @@ static void vmbus_process_rescind_offer(void *context)
 {
        struct vmbus_channel *channel = context;
 
-       VmbusChildDeviceRemove(channel->device_obj);
+       vmbus_child_device_unregister(channel->device_obj);
 }
 
 /*
@@ -847,7 +847,7 @@ void vmbus_release_unattached_channels(void)
                                    "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)
index 163c743ea476595ea4b61ba941cc506e23977223..d7db7d0f5ee6c5589d9c1051dbb24168c13f963d 100644 (file)
@@ -70,16 +70,6 @@ int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
        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
  */
index 189b672a21ee3be93665bf96c904819cf5c1cf4d..59742800b06e8283547519db323c3062c92fb626 100644 (file)
@@ -124,7 +124,6 @@ struct vmbus_driver {
        /* 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);
index 656e9541e5ecee8ef4339641ee291f0fc218dc51..7323f334f83eb6a6792ed229e89ba8c34fa9f775 100644 (file)
@@ -71,7 +71,6 @@ static void vmbus_bus_release(struct device *device);
 
 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);
@@ -298,7 +297,6 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
         * 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);
@@ -580,7 +578,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
  * 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);
 
index d07d832edc01ed7ff89abb159d082778c1f92acb..a5965f8ca107cefa0c18a3f05669594bb4b6ce3a 100644 (file)
@@ -108,7 +108,7 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *deviceType,
 
 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( */