[PATCH 2/3] staging: nvec: replace module_platform register by module_init

Marc Dietrich marvin24 at gmx.de
Sat Apr 27 12:25:46 UTC 2013


This temporary change prevents nvec module unloading until it is
implemented and tested.

Signed-off-by: Marc Dietrich <marvin24 at gmx.de>
---
 drivers/staging/nvec/nvec.c       |    6 +++++-
 drivers/staging/nvec/nvec_kbd.c   |    6 +++++-
 drivers/staging/nvec/nvec_paz00.c |    6 +++++-
 drivers/staging/nvec/nvec_power.c |    6 +++++-
 drivers/staging/nvec/nvec_ps2.c   |    6 +++++-
 5 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index a88959f..979fe40 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -962,7 +962,11 @@ static struct platform_driver nvec_device_driver = {
 	}
 };
 
-module_platform_driver(nvec_device_driver);
+static int __init nvec_init(void)
+{
+	return platform_driver_register(&nvec_device_driver);
+}
+module_init(nvec_init);
 
 MODULE_ALIAS("platform:nvec");
 MODULE_DESCRIPTION("NVIDIA compliant embedded controller interface");
diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
index fdbe0f3..9166abd 100644
--- a/drivers/staging/nvec/nvec_kbd.c
+++ b/drivers/staging/nvec/nvec_kbd.c
@@ -184,7 +184,11 @@ static struct platform_driver nvec_kbd_driver = {
 	},
 };
 
-module_platform_driver(nvec_kbd_driver);
+static int __init nvec_kbd_init(void)
+{
+	return platform_driver_register(&nvec_kbd_driver);
+}
+module_init(nvec_kbd_init);
 
 MODULE_AUTHOR("Marc Dietrich <marvin24 at gmx.de>");
 MODULE_DESCRIPTION("NVEC keyboard driver");
diff --git a/drivers/staging/nvec/nvec_paz00.c b/drivers/staging/nvec/nvec_paz00.c
index 934b796..5b54e31 100644
--- a/drivers/staging/nvec/nvec_paz00.c
+++ b/drivers/staging/nvec/nvec_paz00.c
@@ -90,7 +90,11 @@ static struct platform_driver nvec_paz00_driver = {
 	},
 };
 
-module_platform_driver(nvec_paz00_driver);
+static int __init nvec_paz00_init(void)
+{
+	return platform_driver_register(&nvec_paz00_driver);
+}
+module_init(nvec_paz00_init);
 
 MODULE_AUTHOR("Ilya Petrov <ilya.muromec at gmail.com>");
 MODULE_DESCRIPTION("Tegra NVEC PAZ00 driver");
diff --git a/drivers/staging/nvec/nvec_power.c b/drivers/staging/nvec/nvec_power.c
index 296f7b9..268d837 100644
--- a/drivers/staging/nvec/nvec_power.c
+++ b/drivers/staging/nvec/nvec_power.c
@@ -434,7 +434,11 @@ static struct platform_driver nvec_power_driver = {
 		   }
 };
 
-module_platform_driver(nvec_power_driver);
+static int __init nvec_power_init(void)
+{
+	return platform_driver_register(&nvec_power_driver);
+}
+module_init(nvec_power_init);
 
 MODULE_AUTHOR("Ilya Petrov <ilya.muromec at gmail.com>");
 MODULE_LICENSE("GPL");
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index abb03f0..03a231d 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -175,7 +175,11 @@ static struct platform_driver nvec_mouse_driver = {
 	},
 };
 
-module_platform_driver(nvec_mouse_driver);
+static int __init nvec_mouse_init(void)
+{
+	return platform_driver_register(&nvec_mouse_driver);
+}
+module_init(nvec_mouse_init);
 
 MODULE_DESCRIPTION("NVEC mouse driver");
 MODULE_AUTHOR("Marc Dietrich <marvin24 at gmx.de>");
-- 
1.7.9.5




More information about the devel mailing list