diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2009-09-11 21:46:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:04 -0700 |
commit | 53af545b277508d6b4829e90546cbd1beef536a9 (patch) | |
tree | 8aebf104347e90679873a18799900e8dddb1f5d7 /drivers/staging/hv/Connection.c | |
parent | d29274efb73735c6a94f20214b1e4ea994da8848 (diff) |
Staging: hv: remove more usages of internal list routines
The hv driver has it's own linked list routines. This removes them
from more places in hv.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/Connection.c')
-rw-r--r-- | drivers/staging/hv/Connection.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c index e574389615b..43c2e685501 100644 --- a/drivers/staging/hv/Connection.c +++ b/drivers/staging/hv/Connection.c @@ -57,10 +57,10 @@ int VmbusConnect(void) goto Cleanup; } - INITIALIZE_LIST_HEAD(&gVmbusConnection.ChannelMsgList); + INIT_LIST_HEAD(&gVmbusConnection.ChannelMsgList); spin_lock_init(&gVmbusConnection.channelmsg_lock); - INITIALIZE_LIST_HEAD(&gVmbusConnection.ChannelList); + INIT_LIST_HEAD(&gVmbusConnection.ChannelList); spin_lock_init(&gVmbusConnection.channel_lock); /* @@ -112,8 +112,9 @@ int VmbusConnect(void) * receive the response before returning from this routine */ spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); - INSERT_TAIL_LIST(&gVmbusConnection.ChannelMsgList, - &msgInfo->MsgListEntry); + list_add_tail(&msgInfo->MsgListEntry, + &gVmbusConnection.ChannelMsgList); + spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); DPRINT_DBG(VMBUS, "Vmbus connection - interrupt pfn %llx, " @@ -124,14 +125,14 @@ int VmbusConnect(void) ret = VmbusPostMessage(msg, sizeof(struct vmbus_channel_initiate_contact)); if (ret != 0) { - REMOVE_ENTRY_LIST(&msgInfo->MsgListEntry); + list_del(&msgInfo->MsgListEntry); goto Cleanup; } /* Wait for the connection response */ osd_WaitEventWait(msgInfo->WaitEvent); - REMOVE_ENTRY_LIST(&msgInfo->MsgListEntry); + list_del(&msgInfo->MsgListEntry); /* Check if successful */ if (msgInfo->Response.VersionResponse.VersionSupported) { @@ -223,15 +224,10 @@ struct vmbus_channel *GetChannelFromRelId(u32 relId) { struct vmbus_channel *channel; struct vmbus_channel *foundChannel = NULL; - LIST_ENTRY *anchor; - LIST_ENTRY *curr; unsigned long flags; spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); - ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelList) { - channel = CONTAINING_RECORD(curr, struct vmbus_channel, - ListEntry); - + list_for_each_entry(channel, &gVmbusConnection.ChannelList, ListEntry) { if (channel->OfferMsg.ChildRelId == relId) { foundChannel = channel; break; |