dmaengine: nbpfaxi: Use dev_get_drvdata()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Sun, 28 Apr 2019 04:00:25 +0000 (12:00 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 29 Apr 2019 05:17:15 +0000 (10:47 +0530)
Using dev_get_drvdata directly.

Cc: Vinod Koul <vinod.koul@intel.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/nbpfaxi.c

index a67b292..594409a 100644 (file)
@@ -1491,14 +1491,14 @@ MODULE_DEVICE_TABLE(platform, nbpf_ids);
 #ifdef CONFIG_PM
 static int nbpf_runtime_suspend(struct device *dev)
 {
-       struct nbpf_device *nbpf = platform_get_drvdata(to_platform_device(dev));
+       struct nbpf_device *nbpf = dev_get_drvdata(dev);
        clk_disable_unprepare(nbpf->clk);
        return 0;
 }
 
 static int nbpf_runtime_resume(struct device *dev)
 {
-       struct nbpf_device *nbpf = platform_get_drvdata(to_platform_device(dev));
+       struct nbpf_device *nbpf = dev_get_drvdata(dev);
        return clk_prepare_enable(nbpf->clk);
 }
 #endif