diff options
Diffstat (limited to 'arch/arm/mach-imx/dma.c')
-rw-r--r-- | arch/arm/mach-imx/dma.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c index a59ff2987cb7..ee1c6f06ff64 100644 --- a/arch/arm/mach-imx/dma.c +++ b/arch/arm/mach-imx/dma.c | |||
@@ -410,7 +410,6 @@ void imx_dma_free(imx_dmach_t dma_ch) | |||
410 | 410 | ||
411 | /** | 411 | /** |
412 | * imx_dma_request_by_prio - find and request some of free channels best suiting requested priority | 412 | * imx_dma_request_by_prio - find and request some of free channels best suiting requested priority |
413 | * @dma_ch: i.MX DMA channel number | ||
414 | * @name: the driver/caller own non-%NULL identification | 413 | * @name: the driver/caller own non-%NULL identification |
415 | * @prio: one of the hardware distinguished priority level: | 414 | * @prio: one of the hardware distinguished priority level: |
416 | * %DMA_PRIO_HIGH, %DMA_PRIO_MEDIUM, %DMA_PRIO_LOW | 415 | * %DMA_PRIO_HIGH, %DMA_PRIO_MEDIUM, %DMA_PRIO_LOW |
@@ -420,11 +419,9 @@ void imx_dma_free(imx_dmach_t dma_ch) | |||
420 | * in the higher and then even lower priority groups. | 419 | * in the higher and then even lower priority groups. |
421 | * | 420 | * |
422 | * Return value: If there is no free channel to allocate, -%ENODEV is returned. | 421 | * Return value: If there is no free channel to allocate, -%ENODEV is returned. |
423 | * Zero value indicates successful channel allocation. | 422 | * On successful allocation channel is returned. |
424 | */ | 423 | */ |
425 | int | 424 | imx_dmach_t imx_dma_request_by_prio(const char *name, imx_dma_prio prio) |
426 | imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name, | ||
427 | imx_dma_prio prio) | ||
428 | { | 425 | { |
429 | int i; | 426 | int i; |
430 | int best; | 427 | int best; |
@@ -444,15 +441,13 @@ imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name, | |||
444 | 441 | ||
445 | for (i = best; i < IMX_DMA_CHANNELS; i++) { | 442 | for (i = best; i < IMX_DMA_CHANNELS; i++) { |
446 | if (!imx_dma_request(i, name)) { | 443 | if (!imx_dma_request(i, name)) { |
447 | *pdma_ch = i; | 444 | return i; |
448 | return 0; | ||
449 | } | 445 | } |
450 | } | 446 | } |
451 | 447 | ||
452 | for (i = best - 1; i >= 0; i--) { | 448 | for (i = best - 1; i >= 0; i--) { |
453 | if (!imx_dma_request(i, name)) { | 449 | if (!imx_dma_request(i, name)) { |
454 | *pdma_ch = i; | 450 | return i; |
455 | return 0; | ||
456 | } | 451 | } |
457 | } | 452 | } |
458 | 453 | ||