diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2009-12-14 16:36:37 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-12-31 15:47:18 -0500 |
commit | 4442241ef6ed4d53c13d1c4b18fd57918bb4c850 (patch) | |
tree | 65677e7d79c1a2af1b601ac59f03e21a959c89b0 | |
parent | db5a5ae25aae66354712674b1643759897ff0325 (diff) |
mtd: nomadik_nand.c: use resource_size()
Use resource_size().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/nand/nomadik_nand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c index 66123419f65d..59cbf66607c7 100644 --- a/drivers/mtd/nand/nomadik_nand.c +++ b/drivers/mtd/nand/nomadik_nand.c | |||
@@ -104,21 +104,21 @@ static int nomadik_nand_probe(struct platform_device *pdev) | |||
104 | ret = -EIO; | 104 | ret = -EIO; |
105 | goto err_unmap; | 105 | goto err_unmap; |
106 | } | 106 | } |
107 | host->addr_va = ioremap(res->start, res->end - res->start + 1); | 107 | host->addr_va = ioremap(res->start, resource_size(res)); |
108 | 108 | ||
109 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data"); | 109 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data"); |
110 | if (!res) { | 110 | if (!res) { |
111 | ret = -EIO; | 111 | ret = -EIO; |
112 | goto err_unmap; | 112 | goto err_unmap; |
113 | } | 113 | } |
114 | host->data_va = ioremap(res->start, res->end - res->start + 1); | 114 | host->data_va = ioremap(res->start, resource_size(res)); |
115 | 115 | ||
116 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_cmd"); | 116 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_cmd"); |
117 | if (!res) { | 117 | if (!res) { |
118 | ret = -EIO; | 118 | ret = -EIO; |
119 | goto err_unmap; | 119 | goto err_unmap; |
120 | } | 120 | } |
121 | host->cmd_va = ioremap(res->start, res->end - res->start + 1); | 121 | host->cmd_va = ioremap(res->start, resource_size(res)); |
122 | 122 | ||
123 | if (!host->addr_va || !host->data_va || !host->cmd_va) { | 123 | if (!host->addr_va || !host->data_va || !host->cmd_va) { |
124 | ret = -ENOMEM; | 124 | ret = -ENOMEM; |