From 0e7cb133ccdd77a66de18e095815737f5c4e3481 Mon Sep 17 00:00:00 2001
From: John Ogness <john.ogness@linutronix.de>
Date: Tue, 30 Jan 2018 22:46:56 -0600
Subject: module-basics: add device tree to vain

Modern kernels will use device trees for platform devices, so
make vain do the same.

(Also fixup an unnecessary line break.)

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
 kernel-devel/module-basics/pres_module-basics_en.tex | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(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 4fb72df..71c20eb 100644
--- a/kernel-devel/module-basics/pres_module-basics_en.tex
+++ b/kernel-devel/module-basics/pres_module-basics_en.tex
@@ -378,6 +378,7 @@ static void vain_plat_exit(void)
         .driver         = {
                 .name   = "vain_plat",
                 .owner  = THIS_MODULE,
+                .of_match_table = vain_match,
         },
         .probe          = vain_plat_probe,
         .remove         = vain_plat_remove,
@@ -387,6 +388,21 @@ static void vain_plat_exit(void)
 \end{itemize}
 \end{frame}
 
+\begin{frame}[fragile]
+\frametitle{Platform Driver Module Structure}
+\begin{itemize}
+\item struct of\_device\_id
+\begin{tiny}
+\begin{lstlisting}[frame=trBL]
+|static const struct of_device_id vain_match[] = {
+        { .compatible = "example,vain", },
+        { /* end of table */ }
+};|
+\end{lstlisting}
+\end{tiny}
+\end{itemize}
+\end{frame}
+
 \begin{frame}[fragile]
 \frametitle{Platform Driver Module Structure}
 \begin{itemize}
-- 
cgit v1.2.3

