*/
int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
{
- struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
-
- return vmbusDriver->OnChildDeviceAdd(gDevice, ChildDevice);
+ return vmbus_child_device_register(gDevice, ChildDevice);
}
/*
/* !! Must be the 1st field !! */
/* FIXME if ^, then someone is doing somthing stupid */
struct hv_driver Base;
-
- /* Set by the caller */
- int (*OnChildDeviceAdd)(struct hv_device *RootDevice,
- struct hv_device *ChildDevice);
};
int VmbusInitialize(struct hv_driver *drv);
static void vmbus_device_release(struct device *device);
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 ssize_t vmbus_show_device_attr(struct device *dev,
struct device_attribute *dev_attr,
char *buf);
int ret;
unsigned int vector;
- /*
- * Set this up to allow lower layer to callback to add/remove child
- * devices on the bus
- */
- vmbus_drv_obj->OnChildDeviceAdd = vmbus_child_device_register;
-
/* Call to bus driver to initialize */
ret = drv_init(&vmbus_drv_obj->Base);
if (ret != 0) {
/*
* vmbus_child_device_register - Register the child device on the specified bus
*/
-static int vmbus_child_device_register(struct hv_device *root_device_obj,
- struct hv_device *child_device_obj)
+int vmbus_child_device_register(struct hv_device *root_device_obj,
+ struct hv_device *child_device_obj)
{
int ret = 0;
struct vm_device *root_device_ctx =
struct vmbus_channel *channel);
int VmbusChildDeviceAdd(struct hv_device *Device);
-
+int vmbus_child_device_register(struct hv_device *root_device_obj,
+ struct hv_device *child_device_obj);
void vmbus_child_device_unregister(struct hv_device *device_obj);
/* static void */