diff options
Diffstat (limited to 'drivers/video/sh7760fb.c')
-rw-r--r-- | drivers/video/sh7760fb.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c index bea38fce2470..45e47d847163 100644 --- a/drivers/video/sh7760fb.c +++ b/drivers/video/sh7760fb.c | |||
@@ -459,14 +459,14 @@ static int __devinit sh7760fb_probe(struct platform_device *pdev) | |||
459 | } | 459 | } |
460 | 460 | ||
461 | par->ioarea = request_mem_region(res->start, | 461 | par->ioarea = request_mem_region(res->start, |
462 | (res->end - res->start), pdev->name); | 462 | resource_size(res), pdev->name); |
463 | if (!par->ioarea) { | 463 | if (!par->ioarea) { |
464 | dev_err(&pdev->dev, "mmio area busy\n"); | 464 | dev_err(&pdev->dev, "mmio area busy\n"); |
465 | ret = -EBUSY; | 465 | ret = -EBUSY; |
466 | goto out_fb; | 466 | goto out_fb; |
467 | } | 467 | } |
468 | 468 | ||
469 | par->base = ioremap_nocache(res->start, res->end - res->start + 1); | 469 | par->base = ioremap_nocache(res->start, resource_size(res)); |
470 | if (!par->base) { | 470 | if (!par->base) { |
471 | dev_err(&pdev->dev, "cannot remap\n"); | 471 | dev_err(&pdev->dev, "cannot remap\n"); |
472 | ret = -ENODEV; | 472 | ret = -ENODEV; |
@@ -551,8 +551,7 @@ out_unmap: | |||
551 | free_irq(par->irq, &par->vsync); | 551 | free_irq(par->irq, &par->vsync); |
552 | iounmap(par->base); | 552 | iounmap(par->base); |
553 | out_res: | 553 | out_res: |
554 | release_resource(par->ioarea); | 554 | release_mem_region(res->start, resource_size(res)); |
555 | kfree(par->ioarea); | ||
556 | out_fb: | 555 | out_fb: |
557 | framebuffer_release(info); | 556 | framebuffer_release(info); |
558 | return ret; | 557 | return ret; |
@@ -570,8 +569,7 @@ static int __devexit sh7760fb_remove(struct platform_device *dev) | |||
570 | if (par->irq >= 0) | 569 | if (par->irq >= 0) |
571 | free_irq(par->irq, par); | 570 | free_irq(par->irq, par); |
572 | iounmap(par->base); | 571 | iounmap(par->base); |
573 | release_resource(par->ioarea); | 572 | release_mem_region(par->ioarea->start, resource_size(par->ioarea)); |
574 | kfree(par->ioarea); | ||
575 | framebuffer_release(info); | 573 | framebuffer_release(info); |
576 | platform_set_drvdata(dev, NULL); | 574 | platform_set_drvdata(dev, NULL); |
577 | 575 | ||