clk: mvebu: armada-37xx-periph: Make use of the helper function devm_platform_ioremap_resource()
Subsystems (2)
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
Signed-off-by Cai Huoqing <[email protected]>
--- drivers/clk/mvebu/armada-37xx-periph.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clk/mvebu/armada-37xx-periph.c +1 -3
@@ -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