diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2010-11-06 10:48:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:26:32 -0500 |
commit | 813f0339dd739c48607f12dac79ec26c61874226 (patch) | |
tree | f758f461c71bdc176627af20692b9369ddb11f96 /drivers/net/wireless/rt2x00/rt2x00queue.c | |
parent | 821cde63b5bd04bc3ca0f95e2abf17b04e640488 (diff) |
rt2x00: Rename queue->lock to queue->index_lock
The queue->lock is only used to protect the index
numbers. Rename the lock accordingly.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 32d6a17d5aa..aa4c8f2dc7d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -641,10 +641,10 @@ void rt2x00queue_for_each_entry(struct data_queue *queue, | |||
641 | * it should not be kicked during this run, since it | 641 | * it should not be kicked during this run, since it |
642 | * is part of another TX operation. | 642 | * is part of another TX operation. |
643 | */ | 643 | */ |
644 | spin_lock_irqsave(&queue->lock, irqflags); | 644 | spin_lock_irqsave(&queue->index_lock, irqflags); |
645 | index_start = queue->index[start]; | 645 | index_start = queue->index[start]; |
646 | index_end = queue->index[end]; | 646 | index_end = queue->index[end]; |
647 | spin_unlock_irqrestore(&queue->lock, irqflags); | 647 | spin_unlock_irqrestore(&queue->index_lock, irqflags); |
648 | 648 | ||
649 | /* | 649 | /* |
650 | * Start from the TX done pointer, this guarentees that we will | 650 | * Start from the TX done pointer, this guarentees that we will |
@@ -698,11 +698,11 @@ struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, | |||
698 | return NULL; | 698 | return NULL; |
699 | } | 699 | } |
700 | 700 | ||
701 | spin_lock_irqsave(&queue->lock, irqflags); | 701 | spin_lock_irqsave(&queue->index_lock, irqflags); |
702 | 702 | ||
703 | entry = &queue->entries[queue->index[index]]; | 703 | entry = &queue->entries[queue->index[index]]; |
704 | 704 | ||
705 | spin_unlock_irqrestore(&queue->lock, irqflags); | 705 | spin_unlock_irqrestore(&queue->index_lock, irqflags); |
706 | 706 | ||
707 | return entry; | 707 | return entry; |
708 | } | 708 | } |
@@ -718,7 +718,7 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index) | |||
718 | return; | 718 | return; |
719 | } | 719 | } |
720 | 720 | ||
721 | spin_lock_irqsave(&queue->lock, irqflags); | 721 | spin_lock_irqsave(&queue->index_lock, irqflags); |
722 | 722 | ||
723 | queue->index[index]++; | 723 | queue->index[index]++; |
724 | if (queue->index[index] >= queue->limit) | 724 | if (queue->index[index] >= queue->limit) |
@@ -733,7 +733,7 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index) | |||
733 | queue->count++; | 733 | queue->count++; |
734 | } | 734 | } |
735 | 735 | ||
736 | spin_unlock_irqrestore(&queue->lock, irqflags); | 736 | spin_unlock_irqrestore(&queue->index_lock, irqflags); |
737 | } | 737 | } |
738 | 738 | ||
739 | static void rt2x00queue_reset(struct data_queue *queue) | 739 | static void rt2x00queue_reset(struct data_queue *queue) |
@@ -741,7 +741,7 @@ static void rt2x00queue_reset(struct data_queue *queue) | |||
741 | unsigned long irqflags; | 741 | unsigned long irqflags; |
742 | unsigned int i; | 742 | unsigned int i; |
743 | 743 | ||
744 | spin_lock_irqsave(&queue->lock, irqflags); | 744 | spin_lock_irqsave(&queue->index_lock, irqflags); |
745 | 745 | ||
746 | queue->count = 0; | 746 | queue->count = 0; |
747 | queue->length = 0; | 747 | queue->length = 0; |
@@ -751,7 +751,7 @@ static void rt2x00queue_reset(struct data_queue *queue) | |||
751 | queue->last_action[i] = jiffies; | 751 | queue->last_action[i] = jiffies; |
752 | } | 752 | } |
753 | 753 | ||
754 | spin_unlock_irqrestore(&queue->lock, irqflags); | 754 | spin_unlock_irqrestore(&queue->index_lock, irqflags); |
755 | } | 755 | } |
756 | 756 | ||
757 | void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev) | 757 | void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev) |
@@ -903,7 +903,7 @@ void rt2x00queue_uninitialize(struct rt2x00_dev *rt2x00dev) | |||
903 | static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev, | 903 | static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev, |
904 | struct data_queue *queue, enum data_queue_qid qid) | 904 | struct data_queue *queue, enum data_queue_qid qid) |
905 | { | 905 | { |
906 | spin_lock_init(&queue->lock); | 906 | spin_lock_init(&queue->index_lock); |
907 | 907 | ||
908 | queue->rt2x00dev = rt2x00dev; | 908 | queue->rt2x00dev = rt2x00dev; |
909 | queue->qid = qid; | 909 | queue->qid = qid; |