dmaengine: imx-sdma: remove duplicated sdma_load_context
authorRobin Gong <yibin.gong@nxp.com>
Wed, 14 Jul 2021 10:20:44 +0000 (18:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:09 +0000 (13:40 +0200)
commit e555a03b112838883fdd8185d613c35d043732f2 upstream.

Since sdma_transfer_init() will do sdma_load_context before any
sdma transfer, no need once more in sdma_config_channel().

Fixes: ad0d92d7ba6a ("dmaengine: imx-sdma: refine to load context only once")
Cc: <stable@vger.kernel.org>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Tested-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/imx-sdma.c

index dd9901a85050f5a898dd1dab63c431093d848e83..306f93e4b26a8875a194cc20a112c369b0bc5366 100644 (file)
@@ -1138,7 +1138,6 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
 static int sdma_config_channel(struct dma_chan *chan)
 {
        struct sdma_channel *sdmac = to_sdma_chan(chan);
-       int ret;
 
        sdma_disable_channel(chan);
 
@@ -1178,9 +1177,7 @@ static int sdma_config_channel(struct dma_chan *chan)
                sdmac->watermark_level = 0; /* FIXME: M3_BASE_ADDRESS */
        }
 
-       ret = sdma_load_context(sdmac);
-
-       return ret;
+       return 0;
 }
 
 static int sdma_set_channel_priority(struct sdma_channel *sdmac,