Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1358269
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] rtc: asm9260: remove incorrect __init/__exit annotations |
| Date | 2016-03-15 22:50 +0100 |
| Message-ID | <rd50J-7UJ-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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: Arnd Bergmann <arnd@arndb.de>
Fixes: 125e550fd257 ("rtc: add Alphascale asm9260 driver")
---
drivers/rtc/rtc-asm9260.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index 14e08c4c1a01..355fdb97a006 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -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 @@ err_return:
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);
--
2.7.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] rtc: asm9260: remove incorrect __init/__exit annotations Arnd Bergmann <arnd@arndb.de> - 2016-03-15 22:50 +0100
Re: [PATCH] rtc: asm9260: remove incorrect __init/__exit annotations Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-03-16 10:40 +0100
Re: [PATCH] rtc: asm9260: remove incorrect __init/__exit annotations Oleksij Rempel <linux@rempel-privat.de> - 2016-03-16 10:40 +0100
csiph-web