summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-12-02 08:22:41 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-02 08:24:55 -0800
commit89733aa9cca016a542dc621d147a32d6b0fcdad5 (patch)
tree63d586b77f3f8dd7707cbd72ef0e6544e0744a98
parent2cb22a7a5624603b9db3571fc65489f5389b512c (diff)
Staging: hv: remove OnChildDeviceCreate 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>
-rw-r--r--drivers/staging/hv/channel_mgmt.c2
-rw-r--r--drivers/staging/hv/vmbus.c13
-rw-r--r--drivers/staging/hv/vmbus_api.h3
-rw-r--r--drivers/staging/hv/vmbus_drv.c10
-rw-r--r--drivers/staging/hv/vmbus_private.h2
5 files changed, 5 insertions, 25 deletions
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index ae830f2e4e3..3105fd1afe7 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -355,7 +355,7 @@ static void vmbus_process_offer(void *context)
* We need to set the DeviceObject field before calling
* VmbusChildDeviceAdd()
*/
- newchannel->device_obj = VmbusChildDeviceCreate(
+ newchannel->device_obj = vmbus_child_device_create(
&newchannel->offermsg.offer.InterfaceType,
&newchannel->offermsg.offer.InterfaceInstance,
newchannel);
diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c
index e6462c6774d..163c743ea47 100644
--- a/drivers/staging/hv/vmbus.c
+++ b/drivers/staging/hv/vmbus.c
@@ -61,19 +61,6 @@ static void VmbusGetChannelOffers(void)
}
/*
- * VmbusCreateChildDevice - Creates the child device on the bus that represents the channel offer
- */
-struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
- struct hv_guid *DeviceInstance,
- struct vmbus_channel *channel)
-{
- struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
-
- return vmbusDriver->OnChildDeviceCreate(DeviceType, DeviceInstance,
- channel);
-}
-
-/*
* VmbusChildDeviceAdd - Registers the child device with the vmbus
*/
int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h
index 2af42e55007..e26365c0e79 100644
--- a/drivers/staging/hv/vmbus_api.h
+++ b/drivers/staging/hv/vmbus_api.h
@@ -122,9 +122,6 @@ struct vmbus_driver {
struct hv_driver Base;
/* Set by the caller */
- struct hv_device * (*OnChildDeviceCreate)(struct hv_guid *DeviceType,
- struct hv_guid *DeviceInstance,
- struct vmbus_channel *channel);
void (*OnChildDeviceDestroy)(struct hv_device *device);
int (*OnChildDeviceAdd)(struct hv_device *RootDevice,
struct hv_device *ChildDevice);
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 096587592e2..224e8440b81 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -69,9 +69,6 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id);
static void vmbus_device_release(struct device *device);
static void vmbus_bus_release(struct device *device);
-static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
- struct hv_guid *instance,
- struct vmbus_channel *channel);
static void vmbus_child_device_destroy(struct hv_device *device_obj);
static int vmbus_child_device_register(struct hv_device *root_device_obj,
struct hv_device *child_device_obj);
@@ -301,7 +298,6 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
* Set this up to allow lower layer to callback to add/remove child
* devices on the bus
*/
- vmbus_drv_obj->OnChildDeviceCreate = vmbus_child_device_create;
vmbus_drv_obj->OnChildDeviceDestroy = vmbus_child_device_destroy;
vmbus_drv_obj->OnChildDeviceAdd = vmbus_child_device_register;
vmbus_drv_obj->OnChildDeviceRemove = vmbus_child_device_unregister;
@@ -492,9 +488,9 @@ EXPORT_SYMBOL(vmbus_child_driver_unregister);
* vmbus_child_device_create - Creates and registers a new child device
* on the vmbus.
*/
-static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
- struct hv_guid *instance,
- struct vmbus_channel *channel)
+struct hv_device *vmbus_child_device_create(struct hv_guid *type,
+ struct hv_guid *instance,
+ struct vmbus_channel *channel)
{
struct vm_device *child_device_ctx;
struct hv_device *child_device_obj;
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
index 09eaec964b3..d07d832edc0 100644
--- a/drivers/staging/hv/vmbus_private.h
+++ b/drivers/staging/hv/vmbus_private.h
@@ -102,7 +102,7 @@ extern struct VMBUS_CONNECTION gVmbusConnection;
/* General vmbus interface */
-struct hv_device *VmbusChildDeviceCreate(struct hv_guid *deviceType,
+struct hv_device *vmbus_child_device_create(struct hv_guid *deviceType,
struct hv_guid *deviceInstance,
struct vmbus_channel *channel);