[PATCH 348/641] Staging: hv: remove PFN_CHANNEL_CALLBACK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Come on people, it doesn't get simpler than this, why
have a typedef for something so tiny...

Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/hv/Channel.c     |    4 ++--
 drivers/staging/hv/Channel.h     |    2 +-
 drivers/staging/hv/ChannelMgmt.h |    4 +---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 442e6a3..ed94e36 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -169,7 +169,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
  */
 int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
 		     u32 RecvRingBufferSize, void *UserData, u32 UserDataLen,
-		     PFN_CHANNEL_CALLBACK pfnOnChannelCallback, void *Context)
+		     void (*OnChannelCallback)(void *context), void *Context)
 {
 	struct vmbus_channel_open_channel *openMsg;
 	struct vmbus_channel_msginfo *openInfo;
@@ -183,7 +183,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
 	ASSERT(!(SendRingBufferSize & (PAGE_SIZE - 1)));
 	ASSERT(!(RecvRingBufferSize & (PAGE_SIZE - 1)));
 
-	NewChannel->OnChannelCallback = pfnOnChannelCallback;
+	NewChannel->OnChannelCallback = OnChannelCallback;
 	NewChannel->ChannelCallbackContext = Context;
 
 	/* Allocate the ring buffer */
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index 2fa2825..6b283ed 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -57,7 +57,7 @@ extern int VmbusChannelOpen(struct vmbus_channel *channel,
 			    u32 RecvRingBufferSize,
 			    void *UserData,
 			    u32 UserDataLen,
-			    PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
+			    void(*OnChannelCallback)(void *context),
 			    void *Context);
 
 extern void VmbusChannelClose(struct vmbus_channel *channel);
diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 733ef8d..0730182 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -218,8 +218,6 @@ struct vmbus_channel_version_response {
 	bool VersionSupported;
 } __attribute__((packed));
 
-typedef void (*PFN_CHANNEL_CALLBACK)(void *context);
-
 enum vmbus_channel_state {
 	CHANNEL_OFFER_STATE,
 	CHANNEL_OPENING_STATE,
@@ -256,7 +254,7 @@ struct vmbus_channel {
 	/* Channel callback are invoked in this workqueue context */
 	/* HANDLE dataWorkQueue; */
 
-	PFN_CHANNEL_CALLBACK OnChannelCallback;
+	void (*OnChannelCallback)(void *context);
 	void *ChannelCallbackContext;
 };
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux