From d8c922572ef9a0f511376eded2f4f56fa6b9beae Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Thu, 25 Jan 2024 14:04:07 -0500 Subject: [PATCH] labs/kernel-i2c-input-interface: fix order of explanations Signed-off-by: Michael Opdenacker --- .../kernel-i2c-input-interface.tex | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex b/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex index cfc8d89b29..df72f6e5f0 100644 --- a/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex +++ b/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex @@ -41,6 +41,14 @@ \section{Register an input interface} At this stage, first make sure that your module compiles well (add missing headers if needed). +When the module is loaded, you should get: +\begin{verbatim} +input: Unspecified device as /devices/virtual/input/input0 +\end{verbatim} + +This \code{Unspecified device} string is actually expected +as we haven't filled the fields of the \code{input} structure yet. + \section{Handling probe failures} In the code that you created, make sure that you handle failure @@ -71,15 +79,9 @@ \section{Implement the remove() function} \section{Add proper input device registration information} -We actually need to add more information to the \ksym{input} structure before -registering it. That's why we are getting the below warnings: - -\begin{verbatim} -input: Unspecified device as /devices/virtual/input/input0 -\end{verbatim} - -Add the below lines of code (still before device registration, of -course): +As explained before, we actually need to add more information to the \ksym{input} +structure before registering it. So, add the below lines of code (still before +device registration, of course): \sourcecode{labs/kernel-i2c-input-interface/input-device-attributes.c}