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>
This commit is contained in:
Wolfram Sang
2025-02-27 14:43:01 +01:00
committed by Alexandre Belloni
parent 689602e060
commit 33df0a509d

View File

@@ -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);
}