diff options
-rw-r--r-- | drivers/video/sm501fb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 924d79462780..95be9e90e8b8 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -1338,7 +1338,7 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | info->regs_res = request_mem_region(res->start, | 1340 | info->regs_res = request_mem_region(res->start, |
1341 | res->end - res->start, | 1341 | resource_size(res), |
1342 | pdev->name); | 1342 | pdev->name); |
1343 | 1343 | ||
1344 | if (info->regs_res == NULL) { | 1344 | if (info->regs_res == NULL) { |
@@ -1347,7 +1347,7 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1347 | goto err_release; | 1347 | goto err_release; |
1348 | } | 1348 | } |
1349 | 1349 | ||
1350 | info->regs = ioremap(res->start, (res->end - res->start)+1); | 1350 | info->regs = ioremap(res->start, resource_size(res)); |
1351 | if (info->regs == NULL) { | 1351 | if (info->regs == NULL) { |
1352 | dev_err(dev, "cannot remap registers\n"); | 1352 | dev_err(dev, "cannot remap registers\n"); |
1353 | ret = -ENXIO; | 1353 | ret = -ENXIO; |
@@ -1363,7 +1363,7 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | info->fbmem_res = request_mem_region(res->start, | 1365 | info->fbmem_res = request_mem_region(res->start, |
1366 | (res->end - res->start)+1, | 1366 | resource_size(res), |
1367 | pdev->name); | 1367 | pdev->name); |
1368 | if (info->fbmem_res == NULL) { | 1368 | if (info->fbmem_res == NULL) { |
1369 | dev_err(dev, "cannot claim framebuffer\n"); | 1369 | dev_err(dev, "cannot claim framebuffer\n"); |
@@ -1371,13 +1371,13 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1371 | goto err_regs_map; | 1371 | goto err_regs_map; |
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | info->fbmem = ioremap(res->start, (res->end - res->start)+1); | 1374 | info->fbmem = ioremap(res->start, resource_size(res)); |
1375 | if (info->fbmem == NULL) { | 1375 | if (info->fbmem == NULL) { |
1376 | dev_err(dev, "cannot remap framebuffer\n"); | 1376 | dev_err(dev, "cannot remap framebuffer\n"); |
1377 | goto err_mem_res; | 1377 | goto err_mem_res; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | info->fbmem_len = (res->end - res->start)+1; | 1380 | info->fbmem_len = resource_size(res); |
1381 | 1381 | ||
1382 | /* clear framebuffer memory - avoids garbage data on unused fb */ | 1382 | /* clear framebuffer memory - avoids garbage data on unused fb */ |
1383 | memset(info->fbmem, 0, info->fbmem_len); | 1383 | memset(info->fbmem, 0, info->fbmem_len); |