diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-01 04:51:50 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 19:02:02 (GMT) |
commit | c8212f04d677ff7571339da66e7dc523ef8e8ae1 (patch) | |
tree | 24ecd581804743586e14cadf31f036fae6a476e0 /drivers/staging/hv | |
parent | bd60c33e77a806e18309bb8ab787aa852e30fa56 (diff) | |
download | linux-fsl-qoriq-c8212f04d677ff7571339da66e7dc523ef8e8ae1.tar.xz |
Staging: hv: reorg ChannelMgmt a bit
This gets rid of the unneeded typedef and the forward declarations,
saving a bit of code file size.
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r-- | drivers/staging/hv/ChannelMgmt.c | 61 |
1 files changed, 24 insertions, 37 deletions
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index 1045ff9..4a014ea 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c @@ -24,24 +24,11 @@ #include "logging.h" #include "VmbusPrivate.h" -typedef void (*PFN_CHANNEL_MESSAGE_HANDLER)(struct vmbus_channel_message_header *msg); - struct vmbus_channel_message_table_entry { - enum vmbus_channel_message_type messageType; - PFN_CHANNEL_MESSAGE_HANDLER messageHandler; + enum vmbus_channel_message_type messageType; + void (*messageHandler)(struct vmbus_channel_message_header *msg); }; -static void VmbusChannelOnOffer(struct vmbus_channel_message_header *); -static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *); -static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *); -static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *); -static void VmbusChannelOnGpadlTorndown(struct vmbus_channel_message_header *); -static void VmbusChannelOnOffersDelivered(struct vmbus_channel_message_header *); -static void VmbusChannelOnVersionResponse(struct vmbus_channel_message_header *); -static void VmbusChannelProcessOffer(void *context); -static void VmbusChannelProcessRescindOffer(void *context); - - #define MAX_NUM_DEVICE_CLASSES_SUPPORTED 4 static const struct hv_guid gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED] = { @@ -82,28 +69,6 @@ static const struct hv_guid }, }; -/* Channel message dispatch table */ -static struct vmbus_channel_message_table_entry - gChannelMessageTable[ChannelMessageCount] = { - {ChannelMessageInvalid, NULL}, - {ChannelMessageOfferChannel, VmbusChannelOnOffer}, - {ChannelMessageRescindChannelOffer, VmbusChannelOnOfferRescind}, - {ChannelMessageRequestOffers, NULL}, - {ChannelMessageAllOffersDelivered, VmbusChannelOnOffersDelivered}, - {ChannelMessageOpenChannel, NULL}, - {ChannelMessageOpenChannelResult, VmbusChannelOnOpenResult}, - {ChannelMessageCloseChannel, NULL}, - {ChannelMessageGpadlHeader, NULL}, - {ChannelMessageGpadlBody, NULL}, - {ChannelMessageGpadlCreated, VmbusChannelOnGpadlCreated}, - {ChannelMessageGpadlTeardown, NULL}, - {ChannelMessageGpadlTorndown, VmbusChannelOnGpadlTorndown}, - {ChannelMessageRelIdReleased, NULL}, - {ChannelMessageInitiateContact, NULL}, - {ChannelMessageVersionResponse, VmbusChannelOnVersionResponse}, - {ChannelMessageUnload, NULL}, -}; - /** * AllocVmbusChannel - Allocate and initialize a vmbus channel object */ @@ -574,6 +539,28 @@ static void VmbusChannelOnVersionResponse( DPRINT_EXIT(VMBUS); } +/* Channel message dispatch table */ +static struct vmbus_channel_message_table_entry + gChannelMessageTable[ChannelMessageCount] = { + {ChannelMessageInvalid, NULL}, + {ChannelMessageOfferChannel, VmbusChannelOnOffer}, + {ChannelMessageRescindChannelOffer, VmbusChannelOnOfferRescind}, + {ChannelMessageRequestOffers, NULL}, + {ChannelMessageAllOffersDelivered, VmbusChannelOnOffersDelivered}, + {ChannelMessageOpenChannel, NULL}, + {ChannelMessageOpenChannelResult, VmbusChannelOnOpenResult}, + {ChannelMessageCloseChannel, NULL}, + {ChannelMessageGpadlHeader, NULL}, + {ChannelMessageGpadlBody, NULL}, + {ChannelMessageGpadlCreated, VmbusChannelOnGpadlCreated}, + {ChannelMessageGpadlTeardown, NULL}, + {ChannelMessageGpadlTorndown, VmbusChannelOnGpadlTorndown}, + {ChannelMessageRelIdReleased, NULL}, + {ChannelMessageInitiateContact, NULL}, + {ChannelMessageVersionResponse, VmbusChannelOnVersionResponse}, + {ChannelMessageUnload, NULL}, +}; + /** * VmbusOnChannelMessage - Handler for channel protocol messages. * |