aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-cmos.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-09 12:13:32 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:55:36 -0400
commit28f65c11f2ffb3957259dece647a24f8ad2e241b (patch)
tree6b7621d09d10df89eedd908d4506fb9f457a909f /drivers/rtc/rtc-cmos.c
parent140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff)
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r--drivers/rtc/rtc-cmos.c6
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);
752cleanup0: 752cleanup0:
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;