diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c index 0cb3f3c227fc..fabd398ec1bc 100644 --- a/drivers/staging/android/ram_console.c +++ b/drivers/staging/android/ram_console.c @@ -351,7 +351,7 @@ static int ram_console_driver_probe(struct platform_device *pdev) "%lx\n", res, pdev->num_resources, res ? res->flags : 0); return -ENXIO; } - buffer_size = res->end - res->start + 1; + buffer_size = resource_size(res); start = res->start; printk(KERN_INFO "ram_console: got buffer at %zx, size %zx\n", start, buffer_size);