Skip to contentSkip to conversation

clk: mvebu: armada-37xx-periph: Make use of the helper function devm_platform_ioremap_resource()

PATCH New Cai Huoqing 1 participant 1 message Sep 7, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: mvebu: armada-37xx-periph: 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

---
 drivers/clk/mvebu/armada-37xx-periph.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clk/mvebu/armada-37xx-periph.c +1 -3
index 32ac6b6b7530..081718f5fe05 100644
@@ -732,7 +732,6 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
 	const struct clk_periph_data *data;
 	struct device *dev = &pdev->dev;
 	int num_periph = 0, i, ret;
-	struct resource *res;
 
 	data = of_device_get_match_data(dev);
 	if (!data)
@@ -753,8 +752,7 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	driver_data->hw_data->num = num_periph;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	driver_data->reg = devm_ioremap_resource(dev, res);
+	driver_data->reg = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(driver_data->reg))
 		return PTR_ERR(driver_data->reg);
 
Signature · 1 line
2.25.1