From f7b6b29c541bd582b640f978a4e573d25ddddc1c Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Fri, 13 Nov 2020 11:20:14 +0800 Subject: [PATCH] misc: pir-aschip: Fix pir_aschip_remove() section mismatch WARNING: vmlinux.o(.text+0x3907c4): Section mismatch in reference from the function pir_aschip_remove() to the function .exit.text:pir_aschip_proc_release() The function pir_aschip_remove() references a function in an exit section. Often the function pir_aschip_proc_release() has valid usage outside the exit section and the fix is to remove the __exit annotation of pir_aschip_proc_release. Fixes: 633fa7b96295 ("misc: add Aschip PIR Sensor drivers") Signed-off-by: Tao Huang Change-Id: I459a58755e08b7f418f95985ebed4969c5646d5b --- drivers/misc/pir-aschip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/pir-aschip.c b/drivers/misc/pir-aschip.c index 576990c51c6e..0753ef65f12f 100644 --- a/drivers/misc/pir-aschip.c +++ b/drivers/misc/pir-aschip.c @@ -76,7 +76,7 @@ static const struct file_operations pir_aschip_sensibility_fops = { .write = pir_aschip_sensibility_write, }; -static int __init pir_aschip_create_procfs(struct aschip_pir_drv_data *drv_data) +static int pir_aschip_create_procfs(struct aschip_pir_drv_data *drv_data) { struct proc_dir_entry *ent; @@ -95,7 +95,7 @@ fail: return -ENOMEM; } -static void __exit pir_aschip_proc_release(struct aschip_pir_drv_data *drv_data) +static void pir_aschip_proc_release(struct aschip_pir_drv_data *drv_data) { remove_proc_entry("sensibility", NULL); proc_remove(drv_data->procfs);