diff options
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 911e75cdc125..05beb6c1ca79 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -606,7 +606,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) | |||
606 | * (needing ioremap etc), not i/o space resources like this ... | 606 | * (needing ioremap etc), not i/o space resources like this ... |
607 | */ | 607 | */ |
608 | ports = request_region(ports->start, | 608 | ports = request_region(ports->start, |
609 | ports->end + 1 - ports->start, | 609 | resource_size(ports), |
610 | driver_name); | 610 | driver_name); |
611 | if (!ports) { | 611 | if (!ports) { |
612 | dev_dbg(dev, "i/o registers already in use\n"); | 612 | dev_dbg(dev, "i/o registers already in use\n"); |
@@ -750,7 +750,7 @@ cleanup1: | |||
750 | cmos_rtc.dev = NULL; | 750 | cmos_rtc.dev = NULL; |
751 | rtc_device_unregister(cmos_rtc.rtc); | 751 | rtc_device_unregister(cmos_rtc.rtc); |
752 | cleanup0: | 752 | cleanup0: |
753 | release_region(ports->start, ports->end + 1 - ports->start); | 753 | release_region(ports->start, resource_size(ports)); |
754 | return retval; | 754 | return retval; |
755 | } | 755 | } |
756 | 756 | ||
@@ -779,7 +779,7 @@ static void __exit cmos_do_remove(struct device *dev) | |||
779 | cmos->rtc = NULL; | 779 | cmos->rtc = NULL; |
780 | 780 | ||
781 | ports = cmos->iomem; | 781 | ports = cmos->iomem; |
782 | release_region(ports->start, ports->end + 1 - ports->start); | 782 | release_region(ports->start, resource_size(ports)); |
783 | cmos->iomem = NULL; | 783 | cmos->iomem = NULL; |
784 | 784 | ||
785 | cmos->dev = NULL; | 785 | cmos->dev = NULL; |