On 11/15/22 03:53, Shang XiaoJing wrote:
Due to viafb_exit() with "__exit" tag, it should not be called by the __init function via_core_init().
I wonder if you can't instead of this and your previous patch (ab885d8c7e15) turn the i2c and gpio drivers to proper platform drivers, e.g. adding to bottom of via/via_i2c.c: module_platform_driver(&via_i2c_driver) instead of viafb_i2c_init() and viafb_i2c_exit(). Shouldn't they then automatically be loaded/unloaded? Helge
WARNING: modpost: drivers/video/fbdev/via/viafb.o: section mismatch in reference: init_module (section: .init.text) -> viafb_exit (section: .exit.text) Fixes: ab885d8c7e15 ("fbdev: via: Fix error in via_core_init()") Signed-off-by: Shang XiaoJing <shangxiaojing@xxxxxxxxxx> --- drivers/video/fbdev/via/via-core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/via/via-core.c b/drivers/video/fbdev/via/via-core.c index b2e3b5df38cd..b8cd04defc5e 100644 --- a/drivers/video/fbdev/via/via-core.c +++ b/drivers/video/fbdev/via/via-core.c @@ -734,7 +734,6 @@ static int __init via_core_init(void) if (ret) { viafb_gpio_exit(); viafb_i2c_exit(); - viafb_exit(); return ret; }