aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/common/saa7146/saa7146_hlp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/common/saa7146/saa7146_hlp.c b/drivers/media/common/saa7146/saa7146_hlp.c
index be746d1aee9a..3dc6a838ca6f 100644
--- a/drivers/media/common/saa7146/saa7146_hlp.c
+++ b/drivers/media/common/saa7146/saa7146_hlp.c
@@ -307,7 +307,7 @@ static int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field
307/* simple bubble-sort algorithm with duplicate elimination */ 307/* simple bubble-sort algorithm with duplicate elimination */
308static int sort_and_eliminate(u32* values, int* count) 308static int sort_and_eliminate(u32* values, int* count)
309{ 309{
310 int low = 0, high = 0, top = 0, temp = 0; 310 int low = 0, high = 0, top = 0;
311 int cur = 0, next = 0; 311 int cur = 0, next = 0;
312 312
313 /* sanity checks */ 313 /* sanity checks */
@@ -318,11 +318,8 @@ static int sort_and_eliminate(u32* values, int* count)
318 /* bubble sort the first @count items of the array @values */ 318 /* bubble sort the first @count items of the array @values */
319 for( top = *count; top > 0; top--) { 319 for( top = *count; top > 0; top--) {
320 for( low = 0, high = 1; high < top; low++, high++) { 320 for( low = 0, high = 1; high < top; low++, high++) {
321 if( values[low] > values[high] ) { 321 if( values[low] > values[high] )
322 temp = values[low]; 322 swap(values[low], values[high]);
323 values[low] = values[high];
324 values[high] = temp;
325 }
326 } 323 }
327 } 324 }
328 325