[bootlin/training-materials updates] master: linux: serial: Use proper types and fix a copy/paste error (d616547e)
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Fri Oct 29 10:46:37 CEST 2021
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/d616547e179f1e6e7c07d9545cf37fd78bf2b548
>---------------------------------------------------------------
commit d616547e179f1e6e7c07d9545cf37fd78bf2b548
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date: Wed May 5 23:06:49 2021 +0200
linux: serial: Use proper types and fix a copy/paste error
While at updating the prototypes in the lab book, fix the reg_read() definition
which should return something anyway.
Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
>---------------------------------------------------------------
d616547e179f1e6e7c07d9545cf37fd78bf2b548
labs/kernel-serial-iomem/kernel-serial-iomem.tex | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/labs/kernel-serial-iomem/kernel-serial-iomem.tex b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
index f2bdd3c4..a64ce08b 100644
--- a/labs/kernel-serial-iomem/kernel-serial-iomem.tex
+++ b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
@@ -153,7 +153,7 @@ offset.
Your prototype should look like:
\begin{verbatim}
-static void reg_read(struct serial_dev *serial, int reg);
+static u32 reg_read(struct serial_dev *serial, unsigned int reg);
\end{verbatim}
In this function, read from a 32 bits register at the base virtual
@@ -170,7 +170,7 @@ the device base virtual address. The following code samples are using
the \kfunc{writel} convention of passing the value first, then the
offset. Your prototype should look like:
\begin{verbatim}
-static void reg_write(struct serial_dev *serial, int val, int reg);
+static void reg_write(struct serial_dev *serial, u32 val, unsigned int reg);
\end{verbatim}
In the next sections, we will tell you what register offsets to use
More information about the training-materials-updates
mailing list