From 322bac473ace9c22d638d9aaa4fa9faab1703d01 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Thu, 19 Apr 2018 21:30:17 +0200
Subject: kernel/devel - module: fix driver examples

remove devinit for probe and devexit for unregister functions

add __init and __exit for init and exit functions

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 kernel-devel/module-basics/pres_module-basics_en.tex | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'kernel-devel/module-basics/pres_module-basics_en.tex')

diff --git a/kernel-devel/module-basics/pres_module-basics_en.tex b/kernel-devel/module-basics/pres_module-basics_en.tex
index 9827d3f..6ee58f5 100644
--- a/kernel-devel/module-basics/pres_module-basics_en.tex
+++ b/kernel-devel/module-basics/pres_module-basics_en.tex
@@ -19,7 +19,7 @@
 \item Init
 \begin{scriptsize}
 \begin{lstlisting}[frame=trBL]
-static int vain_init(void)
+static int __init vain_init(void)
 {
         printk(KERN_INFO "vain_init: done\n");
         return 0;
@@ -37,7 +37,7 @@ module_init(vain_init);
 \item Exit
 \begin{scriptsize}
 \begin{lstlisting}[frame=trBL]
-static void vain_exit(void)
+static void __exit vain_exit(void)
 {
         printk(KERN_INFO "vain_exit: done\n");
 }
@@ -150,7 +150,7 @@ vain_exit: done
 \item Init
 \begin{tiny}
 \begin{lstlisting}[frame=trBL]
-static int vain_pci_init(void)
+static int __init vain_pci_init(void)
 {
         int err;
 
@@ -173,7 +173,7 @@ module_init(vain_pci_init);
 \item Exit
 \begin{tiny}
 \begin{lstlisting}[frame=trBL]
-static void vain_pci_exit(void)
+static void __exit vain_pci_exit(void)
 {
         |pci_unregister_driver(&vain_pci_driver);|
         printk(KERN_INFO ``vain_pci_exit: done\n'');
@@ -335,7 +335,7 @@ module_exit(vain_pci_exit);
 \item Init
 \begin{tiny}
 \begin{lstlisting}[frame=trBL]
-static int vain_plat_init(void)
+static int __init vain_plat_init(void)
 {
         int err;
 
@@ -356,7 +356,7 @@ static int vain_plat_init(void)
 \item Exit
 \begin{tiny}
 \begin{lstlisting}[frame=trBL]
-static void vain_plat_exit(void)
+static void __exit vain_plat_exit(void)
 {
         |platform_driver_unregister(&vain_plat_driver);|
         printk(KERN_INFO ``vain_plat_exit: done\n'');
-- 
cgit v1.2.3

