diff options
Diffstat (limited to 'drivers/ide/au1xxx-ide.c')
-rw-r--r-- | drivers/ide/au1xxx-ide.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c index 58121bd6c115..87cef0c440ad 100644 --- a/drivers/ide/au1xxx-ide.c +++ b/drivers/ide/au1xxx-ide.c | |||
@@ -532,14 +532,13 @@ static int au_ide_probe(struct platform_device *dev) | |||
532 | goto out; | 532 | goto out; |
533 | } | 533 | } |
534 | 534 | ||
535 | if (!request_mem_region(res->start, res->end - res->start + 1, | 535 | if (!request_mem_region(res->start, resource_size(res), dev->name)) { |
536 | dev->name)) { | ||
537 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); | 536 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); |
538 | ret = -EBUSY; | 537 | ret = -EBUSY; |
539 | goto out; | 538 | goto out; |
540 | } | 539 | } |
541 | 540 | ||
542 | ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1); | 541 | ahwif->regbase = (u32)ioremap(res->start, resource_size(res)); |
543 | if (ahwif->regbase == 0) { | 542 | if (ahwif->regbase == 0) { |
544 | ret = -ENOMEM; | 543 | ret = -ENOMEM; |
545 | goto out; | 544 | goto out; |
@@ -575,7 +574,7 @@ static int au_ide_remove(struct platform_device *dev) | |||
575 | iounmap((void *)ahwif->regbase); | 574 | iounmap((void *)ahwif->regbase); |
576 | 575 | ||
577 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); | 576 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
578 | release_mem_region(res->start, res->end - res->start + 1); | 577 | release_mem_region(res->start, resource_size(res)); |
579 | 578 | ||
580 | return 0; | 579 | return 0; |
581 | } | 580 | } |