MLK-14524: dma: Fix division by zero
authorRobert Chiras <robert.chiras@nxp.com>
Wed, 29 Mar 2017 06:59:27 +0000 (09:59 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:45 +0000 (15:21 -0500)
commit74344773c5848d294d6f05e31204143466e47467
treef4f5ee1bf0e21c2a313db74816a83d0825bbacf7
parent425a583b138d3f98c589528f5babadf05f95180c
MLK-14524: dma: Fix division by zero

The audio driver is initialized by preparing a DMA slave channel using 0's
as parameters in sdma_prep_dma_cyclic function. This would lead to a
division by zero, since period_len is used as a divisor.
Used the code from 4.1 to fix this, where the division is made only for
non HDMI peripheral types.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
drivers/dma/imx-sdma.c