mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
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>
This commit is contained in:
parent
e0162129c6
commit
ea41191165
@ -146,7 +146,6 @@ static const struct dev_pm_ops rcpm_pm_ops = {
|
|||||||
static int rcpm_probe(struct platform_device *pdev)
|
static int rcpm_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct resource *r;
|
|
||||||
struct rcpm *rcpm;
|
struct rcpm *rcpm;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -154,11 +153,7 @@ static int rcpm_probe(struct platform_device *pdev)
|
|||||||
if (!rcpm)
|
if (!rcpm)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
rcpm->ippdexpcr_base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
if (!r)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
rcpm->ippdexpcr_base = devm_ioremap_resource(&pdev->dev, r);
|
|
||||||
if (IS_ERR(rcpm->ippdexpcr_base)) {
|
if (IS_ERR(rcpm->ippdexpcr_base)) {
|
||||||
ret = PTR_ERR(rcpm->ippdexpcr_base);
|
ret = PTR_ERR(rcpm->ippdexpcr_base);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user