]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rtc: sh: remove useless wrapper function
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 27 Feb 2025 13:43:01 +0000 (14:43 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 8 Apr 2025 13:56:19 +0000 (15:56 +0200)
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>
drivers/rtc/rtc-sh.c

index bf49dbd09caba1ade76c4514fe8b2cbedae7b0fd..033bdfc83e427713760ee21fec7e888eec9987b1 100644 (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);
 }