dmaengine: bcm-sba-raid: Use dev_get_drvdata()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Sun, 28 Apr 2019 04:00:24 +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/bcm-sba-raid.c

index 72878ac..fa81d01 100644 (file)
@@ -1459,8 +1459,7 @@ static void sba_receive_message(struct mbox_client *cl, void *msg)
 
 static int sba_debugfs_stats_show(struct seq_file *file, void *offset)
 {
-       struct platform_device *pdev = to_platform_device(file->private);
-       struct sba_device *sba = platform_get_drvdata(pdev);
+       struct sba_device *sba = dev_get_drvdata(file->private);
 
        /* Write stats in file */
        sba_write_stats_in_seqfile(sba, file);