MLK-11326 dma: mxs-dma: remove the runtime pm dummy code
authorFugang Duan <b38611@freescale.com>
Wed, 5 Aug 2015 10:33:49 +0000 (18:33 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:30 +0000 (14:47 -0500)
Currently, the dma engine driver don't support runtime pm,
and it is not necessary to support the feature since it support
slave sg and cyclic mode, and clock enable/disable during dma
chans allocate and release.

The patch remove the runtime pm dummy code.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 2c8f8e3e6a21184e6cf8b8e5ba3ec8e76794c951)

drivers/dma/mxs-dma.c

index 5b2139f..0e90c17 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/of_device.h>
 #include <linux/of_dma.h>
 #include <linux/list.h>
-#include <linux/pm_runtime.h>
 #include <asm/irq.h>
 
 #include "dmaengine.h"
@@ -909,39 +908,6 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int mxs_dma_runtime_suspend(struct device *dev)
-{
-       struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev);
-
-       if (mxs_dma->dev_id == IMX7D_DMA)
-               clk_disable(mxs_dma->clk_io);
-
-       clk_disable(mxs_dma->clk);
-       return 0;
-}
-
-static int mxs_dma_runtime_resume(struct device *dev)
-{
-       struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev);
-       int ret;
-
-       ret = clk_enable(mxs_dma->clk);
-       if (ret < 0)
-               goto err_out;
-
-       if (mxs_dma->dev_id == IMX7D_DMA) {
-               ret = clk_enable(mxs_dma->clk_io);
-               if (ret < 0)
-                       goto err_out;
-       }
-
-       return 0;
-
-err_out:
-       dev_err(dev, "clk_enable failed: %d\n", ret);
-       return ret;
-}
-
 static int mxs_dma_pm_suspend(struct device *dev)
 {
        /*
@@ -963,7 +929,6 @@ static int mxs_dma_pm_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops mxs_dma_pm_ops = {
-       SET_RUNTIME_PM_OPS(mxs_dma_runtime_suspend, mxs_dma_runtime_resume, NULL)
        SET_SYSTEM_SLEEP_PM_OPS(mxs_dma_pm_suspend, mxs_dma_pm_resume)
 };