diff mbox series

[2/2] soc: bcm63xx-power: Make use of the helper function devm_platform_ioremap_resource()

Message ID 20210908071417.494-2-caihuoqing@baidu.com (mailing list archive)
State New, archived
Headers show
Series [1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource() | expand

Commit Message

Cai,Huoqing Sept. 8, 2021, 7:14 a.m. UTC
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>
---
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Florian Fainelli Sept. 9, 2021, 6:22 p.m. UTC | #1
On Wed, 8 Sep 2021 15:14:16 +0800, Cai Huoqing <caihuoqing@baidu.com> wrote:
> 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>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian
diff mbox series

Patch

diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
index 515fe182dc34..aa72e13d5d0e 100644
--- a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
+++ b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
@@ -91,7 +91,6 @@  static int bcm63xx_power_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
-	struct resource *res;
 	const struct bcm63xx_power_data *entry, *table;
 	struct bcm63xx_power *power;
 	unsigned int ndom;
@@ -102,8 +101,7 @@  static int bcm63xx_power_probe(struct platform_device *pdev)
 	if (!power)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	power->base = devm_ioremap_resource(&pdev->dev, res);
+	power->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(power->base))
 		return PTR_ERR(power->base);