summaryrefslogtreecommitdiff
path: root/drivers/staging/hv
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-12-02 16:34:45 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-02 16:34:45 (GMT)
commit9d8bd71ad4f295f80450b5089d239c3135802699 (patch)
tree162c0e7ff8beefef07f704c7a882fd81f0f6cd32 /drivers/staging/hv
parent9205307cd88f09e51f2c4aeba79266317a299853 (diff)
downloadlinux-fsl-qoriq-9d8bd71ad4f295f80450b5089d239c3135802699.tar.xz
Staging: hv: remove OnChildDeviceRemove vmbus_driver callback
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>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r--drivers/staging/hv/channel_mgmt.c4
-rw-r--r--drivers/staging/hv/vmbus.c10
-rw-r--r--drivers/staging/hv/vmbus_api.h1
-rw-r--r--drivers/staging/hv/vmbus_drv.c4
-rw-r--r--drivers/staging/hv/vmbus_private.h2
5 files changed, 4 insertions, 17 deletions
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index 3105fd1..0f4d609 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -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)
diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c
index 163c743..d7db7d0 100644
--- a/drivers/staging/hv/vmbus.c
+++ b/drivers/staging/hv/vmbus.c
@@ -71,16 +71,6 @@ int VmbusChildDeviceAdd(struct hv_device *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
*/
static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h
index 189b672..5974280 100644
--- a/drivers/staging/hv/vmbus_api.h
+++ b/drivers/staging/hv/vmbus_api.h
@@ -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);
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 656e954..7323f33 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -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);
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
index d07d832..a5965f8 100644
--- a/drivers/staging/hv/vmbus_private.h
+++ b/drivers/staging/hv/vmbus_private.h
@@ -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( */