diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-08 15:16:30 +0800 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2021-10-21 19:37:32 -0500 |
commit | ea41191165fdce7baef9a9ab09523c6d3d0525e1 (patch) | |
tree | d1d3efd0915befb08540dc734b83c684a15f372d /drivers/soc/fsl/rcpm.c | |
parent | e0162129c6763eb02765a1b33fdaac6980fb0c46 (diff) |
soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc/fsl/rcpm.c')
-rw-r--r-- | drivers/soc/fsl/rcpm.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c index 90d3f4060b0c..3d0cae30c769 100644 --- a/drivers/soc/fsl/rcpm.c +++ b/drivers/soc/fsl/rcpm.c @@ -146,7 +146,6 @@ static const struct dev_pm_ops rcpm_pm_ops = { static int rcpm_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *r; struct rcpm *rcpm; int ret; @@ -154,11 +153,7 @@ static int rcpm_probe(struct platform_device *pdev) if (!rcpm) return -ENOMEM; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) - return -ENODEV; - - rcpm->ippdexpcr_base = devm_ioremap_resource(&pdev->dev, r); + rcpm->ippdexpcr_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rcpm->ippdexpcr_base)) { ret = PTR_ERR(rcpm->ippdexpcr_base); return ret; |