git: d00b3eb768 - main - arch-handbook/driverbasics: Fix example code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Jan 2022 02:31:55 UTC
The branch main has been updated by dbaio:
URL: https://cgit.FreeBSD.org/doc/commit/?id=d00b3eb7681921e974ca687151eea5f42fe81b53
commit d00b3eb7681921e974ca687151eea5f42fe81b53
Author: blitztide <david.elliott3040@gmail.com>
AuthorDate: 2022-01-10 13:10:00 +0000
Commit: Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2022-01-11 02:16:25 +0000
arch-handbook/driverbasics: Fix example code
The driver code does not compile as it includes sys/module.h before
sys/param.h.
PR: 261014
Reviewed by: allanjude
Pull Request: https://github.com/freebsd/freebsd-doc/pull/50
---
documentation/content/en/books/arch-handbook/driverbasics/_index.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc b/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
index 6e9fa92f61..acaca6502e 100644
--- a/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
+++ b/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
@@ -77,10 +77,10 @@ Skeleton Layout of a kernel module
*/
#include <sys/types.h>
-#include <sys/module.h>
#include <sys/systm.h> /* uprintf */
#include <sys/errno.h>
#include <sys/param.h> /* defines used in kernel.h */
+#include <sys/module.h>
#include <sys/kernel.h> /* types used in module initialization */
/*
@@ -157,9 +157,9 @@ This simple example pseudo-device remembers whatever values are written to it an
*/
#include <sys/types.h>
-#include <sys/module.h>
#include <sys/systm.h> /* uprintf */
#include <sys/param.h> /* defines used in kernel.h */
+#include <sys/module.h>
#include <sys/kernel.h> /* types used in module initialization */
#include <sys/conf.h> /* cdevsw struct */
#include <sys/uio.h> /* uio struct */