[PATCH] msi-laptop: fix section mismatch in reference from the function load_scm_model_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There have section mismatch warning message shows up when building
the kernel with make CONFIG_DEBUG_SECTION_MISMATCH=y.

The problem is the load_scm_model_init() calls msi_laptop_input_setup()
which is an __init function, but load_scm_model_init() lacks a __init
annotation.

This patch add __init on load_scm_model_init() to avoid warning message.

Cc: Matthew Garrett <mjg@xxxxxxxxxx>
Cc: Dmitry Torokhov <dtor@xxxxxxx>
Cc: Corentin Chary <corentincj@xxxxxxxxxx>
Cc: Thomas Renninger <trenn@xxxxxxx>
Signed-off-by: Lee, Chun-Yi <jlee@xxxxxxxxxx>
---
 drivers/platform/x86/msi-laptop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index 23fb2af..516aca0 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -800,7 +800,7 @@ static void msi_laptop_input_destroy(void)
 	input_unregister_device(msi_laptop_input_dev);
 }
 
-static int load_scm_model_init(struct platform_device *sdev)
+static int __init load_scm_model_init(struct platform_device *sdev)
 {
 	u8 data;
 	int result;
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux