瀏覽代碼

mmc: wmt-sdmmc: Use resource_size()

Used resource_size function instead of explicit computation.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Alexandru Gheorghiu 12 年之前
父節點
當前提交
2211990162
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/mmc/host/wmt-sdmmc.c

+ 1 - 1
drivers/mmc/host/wmt-sdmmc.c

@@ -923,7 +923,7 @@ static int wmt_mci_remove(struct platform_device *pdev)
 	clk_put(priv->clk_sdmmc);
 	clk_put(priv->clk_sdmmc);
 
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	release_mem_region(res->start, res->end - res->start + 1);
+	release_mem_region(res->start, resource_size(res));
 
 
 	mmc_free_host(mmc);
 	mmc_free_host(mmc);