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

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

 



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

Signed-off-by: Marc Dietrich <marvin24@xxxxxx>
---
 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@xxxxxx>");
 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@xxxxxxxxx>");
 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@xxxxxxxxx>");
 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@xxxxxx>");
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux