diff options
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index f84411b6609a..85c016bdfd38 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -586,13 +586,14 @@ static int au_ide_probe(struct device *dev) | |||
586 | goto out; | 586 | goto out; |
587 | } | 587 | } |
588 | 588 | ||
589 | if (!request_mem_region (res->start, res->end-res->start, pdev->name)) { | 589 | if (!request_mem_region(res->start, res->end - res->start + 1, |
590 | pdev->name)) { | ||
590 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); | 591 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); |
591 | ret = -EBUSY; | 592 | ret = -EBUSY; |
592 | goto out; | 593 | goto out; |
593 | } | 594 | } |
594 | 595 | ||
595 | ahwif->regbase = (u32)ioremap(res->start, res->end-res->start); | 596 | ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1); |
596 | if (ahwif->regbase == 0) { | 597 | if (ahwif->regbase == 0) { |
597 | ret = -ENOMEM; | 598 | ret = -ENOMEM; |
598 | goto out; | 599 | goto out; |
@@ -677,7 +678,7 @@ static int au_ide_remove(struct device *dev) | |||
677 | iounmap((void *)ahwif->regbase); | 678 | iounmap((void *)ahwif->regbase); |
678 | 679 | ||
679 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 680 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
680 | release_mem_region(res->start, res->end - res->start); | 681 | release_mem_region(res->start, res->end - res->start + 1); |
681 | 682 | ||
682 | return 0; | 683 | return 0; |
683 | } | 684 | } |