Commit 9787ab58 authored by Cai Huoqing's avatar Cai Huoqing Committed by Florian Fainelli

soc: bcm63xx-power: 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: default avatarCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
parent dc3401c8
...@@ -91,7 +91,6 @@ static int bcm63xx_power_probe(struct platform_device *pdev) ...@@ -91,7 +91,6 @@ static int bcm63xx_power_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct resource *res;
const struct bcm63xx_power_data *entry, *table; const struct bcm63xx_power_data *entry, *table;
struct bcm63xx_power *power; struct bcm63xx_power *power;
unsigned int ndom; unsigned int ndom;
...@@ -102,8 +101,7 @@ static int bcm63xx_power_probe(struct platform_device *pdev) ...@@ -102,8 +101,7 @@ static int bcm63xx_power_probe(struct platform_device *pdev)
if (!power) if (!power)
return -ENOMEM; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); power->base = devm_platform_ioremap_resource(pdev, 0);
power->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(power->base)) if (IS_ERR(power->base))
return PTR_ERR(power->base); return PTR_ERR(power->base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment