@@ -863,6 +863,22 @@ static int mxs_dma_probe(struct platform_device *pdev)
return 0;
}
+static int mxs_dma_remove(struct platform_device *pdev)
+{
+ struct mxs_dma_engine *mxs_dma = platform_get_drvdata(pdev);
+ int i;
+
+ dma_async_device_unregister(&mxs_dma->dma_device);
+
+ for (i = 0; i < MXS_DMA_CHANNELS; i++) {
+ struct mxs_dma_chan *mxs_chan = &mxs_dma->mxs_chans[i];
+
+ tasklet_kill(&mxs_chan->tasklet);
+ }
+
+ return 0;
+}
+
static struct platform_driver mxs_dma_driver = {
.driver = {
.name = "mxs-dma",
@@ -870,6 +886,7 @@ static struct platform_driver mxs_dma_driver = {
},
.id_table = mxs_dma_ids,
.probe = mxs_dma_probe,
+ .remove = mxs_dma_remove,
};
module_platform_driver(mxs_dma_driver);
add the remove function for mxs-dma Signed-off-by: Han Xu <han.xu@nxp.com> --- drivers/dma/mxs-dma.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)