diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-04-15 23:00:21 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-04-18 23:42:04 +0300 |
commit | 06030d5001494f67fe2dee65c49c2f0e54e34eba (patch) | |
tree | fbc07dc837e5e7912c50527eabed2aa74f60a9a5 /drivers/rtc/rtc-mt2712.c | |
parent | 3642b17e9a8d32ddf8d74cd033de7efcd0a15aec (diff) | |
download | linux-06030d5001494f67fe2dee65c49c2f0e54e34eba.tar.xz |
rtc: mt2712: switch to devm_platform_ioremap_resource
Using devm_platform_ioremap_resource instead of open coding it reduces the
size of the binary.
text data bss dec hex filename
3728 216 0 3944 f68 drivers/rtc/rtc-mt2712.o
3744 216 0 3960 f78 drivers/rtc/rtc-mt2712.o.old
Link: https://lore.kernel.org/r/20200415200021.157118-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-mt2712.c')
-rw-r--r-- | drivers/rtc/rtc-mt2712.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-mt2712.c b/drivers/rtc/rtc-mt2712.c index 9868d98f397c..d5f691c8a035 100644 --- a/drivers/rtc/rtc-mt2712.c +++ b/drivers/rtc/rtc-mt2712.c @@ -310,7 +310,6 @@ static const struct rtc_class_ops mt2712_rtc_ops = { static int mt2712_rtc_probe(struct platform_device *pdev) { - struct resource *res; struct mt2712_rtc *mt2712_rtc; int ret; @@ -319,8 +318,7 @@ static int mt2712_rtc_probe(struct platform_device *pdev) if (!mt2712_rtc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mt2712_rtc->base = devm_ioremap_resource(&pdev->dev, res); + mt2712_rtc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mt2712_rtc->base)) return PTR_ERR(mt2712_rtc->base); |