From 4a1494fc101b05f895ef52b9d01769d382c5a6e2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 2 Dec 2010 08:44:48 -0800 Subject: [PATCH] Staging: hv: remove OnMsgDpc vmbus_driver callback It's only ever set to one function, so just call that function instead. Cc: Haiyang Zhang Cc: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/vmbus.c | 5 ++--- drivers/staging/hv/vmbus_api.h | 2 +- drivers/staging/hv/vmbus_drv.c | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c index 09b0451..df986be 100644 --- a/drivers/staging/hv/vmbus.c +++ b/drivers/staging/hv/vmbus.c @@ -119,9 +119,9 @@ static void VmbusOnCleanup(struct hv_driver *drv) } /* - * VmbusOnMsgDPC - DPC routine to handle messages from the hypervisior + * vmbus_on_msg_dpc - DPC routine to handle messages from the hypervisior */ -static void VmbusOnMsgDPC(struct hv_driver *drv) +void vmbus_on_msg_dpc(struct hv_driver *drv) { int cpu = smp_processor_id(); void *page_addr = hv_context.synic_message_page[cpu]; @@ -235,7 +235,6 @@ int VmbusInitialize(struct hv_driver *drv) driver->Base.OnDeviceAdd = VmbusOnDeviceAdd; driver->Base.OnDeviceRemove = VmbusOnDeviceRemove; driver->Base.OnCleanup = VmbusOnCleanup; - driver->OnMsgDpc = VmbusOnMsgDPC; driver->OnEventDpc = VmbusOnEventDPC; driver->GetChannelOffers = VmbusGetChannelOffers; diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h index d0c30a7..332a92d 100644 --- a/drivers/staging/hv/vmbus_api.h +++ b/drivers/staging/hv/vmbus_api.h @@ -126,12 +126,12 @@ struct vmbus_driver { struct hv_device *ChildDevice); /* Set by the callee */ - void (*OnMsgDpc)(struct hv_driver *driver); void (*OnEventDpc)(struct hv_driver *driver); void (*GetChannelOffers)(void); }; int VmbusInitialize(struct hv_driver *drv); int vmbus_on_isr(struct hv_driver *drv); +void vmbus_on_msg_dpc(struct hv_driver *drv); #endif /* _VMBUS_API_H_ */ diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 4551a46..d57f54d 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -849,14 +849,12 @@ static void vmbus_msg_dpc(unsigned long data) { struct vmbus_driver *vmbus_drv_obj = (struct vmbus_driver *)data; - /* ASSERT(vmbus_drv_obj->OnMsgDpc != NULL); */ - /* Call to bus driver to handle interrupt */ - vmbus_drv_obj->OnMsgDpc(&vmbus_drv_obj->Base); + vmbus_on_msg_dpc(&vmbus_drv_obj->Base); } /* - * vmbus_msg_dpc - Tasklet routine to handle hypervisor events + * vmbus_event_dpc - Tasklet routine to handle hypervisor events */ static void vmbus_event_dpc(unsigned long data) { -- 2.7.4