浏览代码

Staging: hv: remove OnIsr 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>
Greg Kroah-Hartman 14 年之前
父节点
当前提交
097e310329
共有 3 个文件被更改,包括 4 次插入7 次删除
  1. 2 3
      drivers/staging/hv/vmbus.c
  2. 1 1
      drivers/staging/hv/vmbus_api.h
  3. 1 3
      drivers/staging/hv/vmbus_drv.c

+ 2 - 3
drivers/staging/hv/vmbus.c

@@ -175,9 +175,9 @@ static void VmbusOnEventDPC(struct hv_driver *drv)
 }
 }
 
 
 /*
 /*
- * VmbusOnISR - ISR routine
+ * vmbus_on_isr - ISR routine
  */
  */
-static int VmbusOnISR(struct hv_driver *drv)
+int vmbus_on_isr(struct hv_driver *drv)
 {
 {
 	int ret = 0;
 	int ret = 0;
 	int cpu = smp_processor_id();
 	int cpu = smp_processor_id();
@@ -235,7 +235,6 @@ int VmbusInitialize(struct hv_driver *drv)
 	driver->Base.OnDeviceAdd	= VmbusOnDeviceAdd;
 	driver->Base.OnDeviceAdd	= VmbusOnDeviceAdd;
 	driver->Base.OnDeviceRemove	= VmbusOnDeviceRemove;
 	driver->Base.OnDeviceRemove	= VmbusOnDeviceRemove;
 	driver->Base.OnCleanup		= VmbusOnCleanup;
 	driver->Base.OnCleanup		= VmbusOnCleanup;
-	driver->OnIsr			= VmbusOnISR;
 	driver->OnMsgDpc		= VmbusOnMsgDPC;
 	driver->OnMsgDpc		= VmbusOnMsgDPC;
 	driver->OnEventDpc		= VmbusOnEventDPC;
 	driver->OnEventDpc		= VmbusOnEventDPC;
 	driver->GetChannelOffers	= VmbusGetChannelOffers;
 	driver->GetChannelOffers	= VmbusGetChannelOffers;

+ 1 - 1
drivers/staging/hv/vmbus_api.h

@@ -126,12 +126,12 @@ struct vmbus_driver {
 				struct hv_device *ChildDevice);
 				struct hv_device *ChildDevice);
 
 
 	/* Set by the callee */
 	/* Set by the callee */
-	int (*OnIsr)(struct hv_driver *driver);
 	void (*OnMsgDpc)(struct hv_driver *driver);
 	void (*OnMsgDpc)(struct hv_driver *driver);
 	void (*OnEventDpc)(struct hv_driver *driver);
 	void (*OnEventDpc)(struct hv_driver *driver);
 	void (*GetChannelOffers)(void);
 	void (*GetChannelOffers)(void);
 };
 };
 
 
 int VmbusInitialize(struct hv_driver *drv);
 int VmbusInitialize(struct hv_driver *drv);
+int vmbus_on_isr(struct hv_driver *drv);
 
 
 #endif /* _VMBUS_API_H_ */
 #endif /* _VMBUS_API_H_ */

+ 1 - 3
drivers/staging/hv/vmbus_drv.c

@@ -873,10 +873,8 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
 	struct vmbus_driver *vmbus_driver_obj = &g_vmbus_drv.drv_obj;
 	struct vmbus_driver *vmbus_driver_obj = &g_vmbus_drv.drv_obj;
 	int ret;
 	int ret;
 
 
-	/* ASSERT(vmbus_driver_obj->OnIsr != NULL); */
-
 	/* Call to bus driver to handle interrupt */
 	/* Call to bus driver to handle interrupt */
-	ret = vmbus_driver_obj->OnIsr(&vmbus_driver_obj->Base);
+	ret = vmbus_on_isr(&vmbus_driver_obj->Base);
 
 
 	/* Schedules a dpc if necessary */
 	/* Schedules a dpc if necessary */
 	if (ret > 0) {
 	if (ret > 0) {