git: d00b3eb768 - main - arch-handbook/driverbasics: Fix example code

"Danilo G. Baio" <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by dbaio:

URL: https://cgit.FreeBSD.org/doc/commit/?id=d00b3eb7681921e974ca687151eea5f42fe81b53

commit d00b3eb7681921e974ca687151eea5f42fe81b53
Author:     blitztide <[email protected]>
AuthorDate: 2022-01-10 13:10:00 +0000
Commit:     Danilo G. Baio <[email protected]>
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 */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.