diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-04 16:04:57 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-09-07 23:43:05 +0300 |
commit | 7ce5eed0998c0b2884329a06f29d0251079fca62 (patch) | |
tree | c8940e37564626beaed9e78e6b52bb8c843fb543 /drivers/scsi | |
parent | 0b27555166241cb54e203f82bb98ebea2286fe9e (diff) | |
download | linux-7ce5eed0998c0b2884329a06f29d0251079fca62.tar.xz |
scsi: ufs-hisi: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Link: https://lore.kernel.org/r/20190904130457.24744-1-yuehaibing@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufs-hisi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c index f4d1dca962c4..6bbb1679bb91 100644 --- a/drivers/scsi/ufs/ufs-hisi.c +++ b/drivers/scsi/ufs/ufs-hisi.c @@ -447,13 +447,11 @@ static int ufs_hisi_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) static int ufs_hisi_get_resource(struct ufs_hisi_host *host) { - struct resource *mem_res; struct device *dev = host->hba->dev; struct platform_device *pdev = to_platform_device(dev); /* get resource of ufs sys ctrl */ - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - host->ufs_sys_ctrl = devm_ioremap_resource(dev, mem_res); + host->ufs_sys_ctrl = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(host->ufs_sys_ctrl)) return PTR_ERR(host->ufs_sys_ctrl); |