summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2025-02-27 14:43:01 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2025-04-08 15:56:19 +0200
commit33df0a509dad96046aa7f9b133495bdccf77c593 (patch)
tree414377ef8061e7bdf6b9abe406c87e0a4a98e733
parent689602e0609e2209e294f213c6cb5a6798517f4d (diff)
rtc: sh: remove useless wrapper function
The wrapper to enable interrupts is so thin that we can use it directly. Also gets rid of an 'inline' which doesn't make sense here. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250227134256.9167-16-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/rtc-sh.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index bf49dbd09cab..033bdfc83e42 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -115,7 +115,7 @@ static irqreturn_t sh_rtc_alarm(int irq, void *dev_id)
return IRQ_RETVAL(pending);
}
-static inline void sh_rtc_setaie(struct device *dev, unsigned int enable)
+static int sh_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
{
struct sh_rtc *rtc = dev_get_drvdata(dev);
unsigned int tmp;
@@ -132,11 +132,7 @@ static inline void sh_rtc_setaie(struct device *dev, unsigned int enable)
writeb(tmp, rtc->regbase + RCR1);
spin_unlock_irq(&rtc->lock);
-}
-static int sh_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
-{
- sh_rtc_setaie(dev, enabled);
return 0;
}
@@ -457,7 +453,7 @@ static void __exit sh_rtc_remove(struct platform_device *pdev)
{
struct sh_rtc *rtc = platform_get_drvdata(pdev);
- sh_rtc_setaie(&pdev->dev, 0);
+ sh_rtc_alarm_irq_enable(&pdev->dev, 0);
clk_disable(rtc->clk);
}