spi_bfin5xx.c: use resource_size()
diff mbox

Message ID BD79186B4FD85F4B8E60E381CAEE19090200EA82@mi8nycmail19.Mi8.com
State Accepted
Headers show

Commit Message

Hartley Sweeten Dec. 14, 2009, 10:33 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 73e24ef..1d41058 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;