From 74947b898220c8af794f3de3f3c73a39799b4c4f Mon Sep 17 00:00:00 2001 From: hartleys Date: Mon, 14 Dec 2009 22:33:43 +0000 Subject: spi: spi_bfin5xx.c: use resource_size() Signed-off-by: H Hartley Sweeten Cc: David Brownell Cc: Bryan Wu Signed-off-by: Grant Likely --- drivers/spi/spi_bfin5xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 73e24ef5a2f9..1d41058bbab2 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -1294,7 +1294,7 @@ static int __init bfin_spi_probe(struct platform_device *pdev) goto out_error_get_res; } - drv_data->regs_base = ioremap(res->start, (res->end - res->start + 1)); + drv_data->regs_base = ioremap(res->start, resource_size(res)); if (drv_data->regs_base == NULL) { dev_err(dev, "Cannot map IO\n"); status = -ENXIO; -- cgit v1.2.3