Commit 15c6ea6f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Alexandre Belloni

rtc: asm9260: remove incorrect __init/__exit annotations

The probe and remove callbacks of the platform driver are marked __init
and __exit, respectively. However, this is not a correct way to annotate
them, as it will result in those sections to be discarded at link time
or after boot, while we can actually call them again based on manual
unbinding, or deferred probing.

Kbuild warns about the problem:

WARNING: drivers/rtc/rtc-asm9260.o(.data+0x0): Section mismatch in reference from the variable asm9260_rtc_driver to the function .init.text:asm9260_rtc_probe()

This removes the annotations, so we no longer branch into missing
code and avoid the warning.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 125e550f ("rtc: add Alphascale asm9260 driver")
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent bcebd81d
......@@ -255,7 +255,7 @@ static const struct rtc_class_ops asm9260_rtc_ops = {
.alarm_irq_enable = asm9260_alarm_irq_enable,
};
static int __init asm9260_rtc_probe(struct platform_device *pdev)
static int asm9260_rtc_probe(struct platform_device *pdev)
{
struct asm9260_rtc_priv *priv;
struct device *dev = &pdev->dev;
......@@ -323,7 +323,7 @@ static int __init asm9260_rtc_probe(struct platform_device *pdev)
return ret;
}
static int __exit asm9260_rtc_remove(struct platform_device *pdev)
static int asm9260_rtc_remove(struct platform_device *pdev)
{
struct asm9260_rtc_priv *priv = platform_get_drvdata(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment