diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/s3c2410fb.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 61c819e35f7f..0aa13761de6e 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -867,7 +867,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
867 | goto dealloc_fb; | 867 | goto dealloc_fb; |
868 | } | 868 | } |
869 | 869 | ||
870 | size = (res->end - res->start) + 1; | 870 | size = resource_size(res); |
871 | info->mem = request_mem_region(res->start, size, pdev->name); | 871 | info->mem = request_mem_region(res->start, size, pdev->name); |
872 | if (info->mem == NULL) { | 872 | if (info->mem == NULL) { |
873 | dev_err(&pdev->dev, "failed to get memory region\n"); | 873 | dev_err(&pdev->dev, "failed to get memory region\n"); |
@@ -997,8 +997,7 @@ release_irq: | |||
997 | release_regs: | 997 | release_regs: |
998 | iounmap(info->io); | 998 | iounmap(info->io); |
999 | release_mem: | 999 | release_mem: |
1000 | release_resource(info->mem); | 1000 | release_mem_region(res->start, size); |
1001 | kfree(info->mem); | ||
1002 | dealloc_fb: | 1001 | dealloc_fb: |
1003 | platform_set_drvdata(pdev, NULL); | 1002 | platform_set_drvdata(pdev, NULL); |
1004 | framebuffer_release(fbinfo); | 1003 | framebuffer_release(fbinfo); |
@@ -1044,8 +1043,7 @@ static int __devexit s3c2410fb_remove(struct platform_device *pdev) | |||
1044 | 1043 | ||
1045 | iounmap(info->io); | 1044 | iounmap(info->io); |
1046 | 1045 | ||
1047 | release_resource(info->mem); | 1046 | release_mem_region(info->mem->start, resource_size(info->mem)); |
1048 | kfree(info->mem); | ||
1049 | 1047 | ||
1050 | platform_set_drvdata(pdev, NULL); | 1048 | platform_set_drvdata(pdev, NULL); |
1051 | framebuffer_release(fbinfo); | 1049 | framebuffer_release(fbinfo); |