Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4b9ef65 authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Maxime Ripard
Browse files

clk: sunxi: Use resource_size



Use the function resource_size instaed of explicit computation.

Problem found using Coccinelle.

Signed-off-by: default avatarVaishali Thakkar <vaishali.thakkar@oracle.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 5ed400dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)

	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	/* one clock/reset pair per word */
	count = DIV_ROUND_UP((r->end - r->start + 1), SUN9I_MMC_WIDTH);
	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
	data->membase = devm_ioremap_resource(&pdev->dev, r);
	if (IS_ERR(data->membase))
		return PTR_ERR(data->membase);