# \[PATCH v3 12/27\] rtc: replace devm\_ioremap\_nocache with devm\_ioremap

- From: Yisheng Xie \<hidden\>
- Date: 2017-12-23 11:08:31 
- List: linux-rtc
- Page: https://ratatoskr.run/linux-rtc/2017/12/5166328
- Thread: https://ratatoskr.run/linux-rtc/2017/12/5166328/t.md

```text
Default ioremap is ioremap_nocache, so devm_ioremap has the same
function with devm_ioremap_nocache, which can just be killed to
save the size of devres.o

This patch is to use use devm_ioremap instead of devm_ioremap_nocache,
which should not have any function change but prepare for killing
devm_ioremap_nocache.

Cc: Alessandro Zummo <redacted>
Cc: Alexandre Belloni <redacted>
Cc: <redacted>
Signed-off-by: Yisheng Xie <redacted>
---
 drivers/rtc/rtc-sh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index 6c2d398..3e53039 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -592,8 +592,8 @@ static int __init sh_rtc_probe(struct platform_device *pdev)
 	if (unlikely(!rtc->res))
 		return -EBUSY;
 
-	rtc->regbase = devm_ioremap_nocache(&pdev->dev, rtc->res->start,
-					rtc->regsize);
+	rtc->regbase = devm_ioremap(&pdev->dev, rtc->res->start,
+				    rtc->regsize);
 	if (unlikely(!rtc->regbase))
 		return -EINVAL;
 
-- 
1.8.3.1
```
