[PATCH] stm: Add __init/__exit annotations to module init/exit funcs
Xiu Jianfeng
xiujianfeng at huawei.com
Thu Sep 22 04:10:22 PDT 2022
Add missing __init/__exit annotations to module init/exit funcs.
Signed-off-by: Xiu Jianfeng <xiujianfeng at huawei.com>
---
drivers/hwtracing/stm/console.c | 4 ++--
drivers/hwtracing/stm/dummy_stm.c | 4 ++--
drivers/hwtracing/stm/heartbeat.c | 4 ++--
drivers/hwtracing/stm/p_basic.c | 4 ++--
drivers/hwtracing/stm/p_sys-t.c | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/hwtracing/stm/console.c b/drivers/hwtracing/stm/console.c
index a00f65e21747..c324122321b9 100644
--- a/drivers/hwtracing/stm/console.c
+++ b/drivers/hwtracing/stm/console.c
@@ -54,12 +54,12 @@ static void stm_console_unlink(struct stm_source_data *data)
unregister_console(&sc->console);
}
-static int stm_console_init(void)
+static int __init stm_console_init(void)
{
return stm_source_register_device(NULL, &stm_console.data);
}
-static void stm_console_exit(void)
+static void __exit stm_console_exit(void)
{
stm_source_unregister_device(&stm_console.data);
}
diff --git a/drivers/hwtracing/stm/dummy_stm.c b/drivers/hwtracing/stm/dummy_stm.c
index 38528ffdc0b3..992e545559ea 100644
--- a/drivers/hwtracing/stm/dummy_stm.c
+++ b/drivers/hwtracing/stm/dummy_stm.c
@@ -66,7 +66,7 @@ static int dummy_stm_link(struct stm_data *data, unsigned int master,
return 0;
}
-static int dummy_stm_init(void)
+static int __init dummy_stm_init(void)
{
int i, ret = -ENOMEM;
@@ -107,7 +107,7 @@ static int dummy_stm_init(void)
}
-static void dummy_stm_exit(void)
+static void __exit dummy_stm_exit(void)
{
int i;
diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/heartbeat.c
index 81d7b21d31ec..e2930ab803b4 100644
--- a/drivers/hwtracing/stm/heartbeat.c
+++ b/drivers/hwtracing/stm/heartbeat.c
@@ -62,7 +62,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)
hrtimer_cancel(&heartbeat->hrtimer);
}
-static int stm_heartbeat_init(void)
+static int __init stm_heartbeat_init(void)
{
int i, ret;
@@ -102,7 +102,7 @@ static int stm_heartbeat_init(void)
return ret;
}
-static void stm_heartbeat_exit(void)
+static void __exit stm_heartbeat_exit(void)
{
int i;
diff --git a/drivers/hwtracing/stm/p_basic.c b/drivers/hwtracing/stm/p_basic.c
index 8980a6a5fd6c..921ad66574c5 100644
--- a/drivers/hwtracing/stm/p_basic.c
+++ b/drivers/hwtracing/stm/p_basic.c
@@ -30,12 +30,12 @@ static const struct stm_protocol_driver basic_pdrv = {
.write = basic_write,
};
-static int basic_stm_init(void)
+static int __init basic_stm_init(void)
{
return stm_register_protocol(&basic_pdrv);
}
-static void basic_stm_exit(void)
+static void __exit basic_stm_exit(void)
{
stm_unregister_protocol(&basic_pdrv);
}
diff --git a/drivers/hwtracing/stm/p_sys-t.c b/drivers/hwtracing/stm/p_sys-t.c
index 8254971c02e7..f7d05915695a 100644
--- a/drivers/hwtracing/stm/p_sys-t.c
+++ b/drivers/hwtracing/stm/p_sys-t.c
@@ -366,12 +366,12 @@ static const struct stm_protocol_driver sys_t_pdrv = {
.output_close = sys_t_output_close,
};
-static int sys_t_stm_init(void)
+static int __init sys_t_stm_init(void)
{
return stm_register_protocol(&sys_t_pdrv);
}
-static void sys_t_stm_exit(void)
+static void __exit sys_t_stm_exit(void)
{
stm_unregister_protocol(&sys_t_pdrv);
}
--
2.17.1
More information about the linux-arm-kernel
mailing list