Skip to content

Commit 33df0a5

Browse files
Wolfram Sangalexandrebelloni
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 689602e commit 33df0a5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/rtc/rtc-sh.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static irqreturn_t sh_rtc_alarm(int irq, void *dev_id)
115115
return IRQ_RETVAL(pending);
116116
}
117117

118-
static inline void sh_rtc_setaie(struct device *dev, unsigned int enable)
118+
static int sh_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
119119
{
120120
struct sh_rtc *rtc = dev_get_drvdata(dev);
121121
unsigned int tmp;
@@ -132,11 +132,7 @@ static inline void sh_rtc_setaie(struct device *dev, unsigned int enable)
132132
writeb(tmp, rtc->regbase + RCR1);
133133

134134
spin_unlock_irq(&rtc->lock);
135-
}
136135

137-
static int sh_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
138-
{
139-
sh_rtc_setaie(dev, enabled);
140136
return 0;
141137
}
142138

@@ -457,7 +453,7 @@ static void __exit sh_rtc_remove(struct platform_device *pdev)
457453
{
458454
struct sh_rtc *rtc = platform_get_drvdata(pdev);
459455

460-
sh_rtc_setaie(&pdev->dev, 0);
456+
sh_rtc_alarm_irq_enable(&pdev->dev, 0);
461457

462458
clk_disable(rtc->clk);
463459
}

0 commit comments

Comments
 (0)