Date: Wed, 10 Dec 2003 08:51:34 +0100 (CET) From: Lukas Ertl <l.ertl@univie.ac.at> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/60107: [PATCH] update sample code in PCI driver chapter of arch handbook Message-ID: <200312100751.hBA7pYwd000846@korben.in.tern> Resent-Message-ID: <200312100800.hBA80h1P083430@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60107 >Category: docs >Synopsis: [PATCH] update sample code in PCI driver chapter of arch handbook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 10 00:00:43 PST 2003 >Closed-Date: >Last-Modified: >Originator: Lukas Ertl >Release: FreeBSD 5.2-CURRENT i386 >Organization: Vienna University Computer Center >Environment: System: FreeBSD korben 5.2-CURRENT FreeBSD 5.2-CURRENT #71: Mon Dec 8 21:32:27 CET 2003 le@korben:/usr/obj/usr/src/sys/KORBEN i386 >Description: The following patch updates some of the sample code in the PCI driver chapter of the arch handbook to work correctly on 5.X. >How-To-Repeat: >Fix: --- archdoc.diff begins here --- Index: en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml =================================================================== RCS file: /usr/local/bsdcvs/doc/en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml,v retrieving revision 1.14 diff -u -r1.14 chapter.sgml --- en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml 5 Nov 2003 10:50:50 -0000 1.14 +++ en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml 10 Dec 2003 07:45:43 -0000 @@ -25,18 +25,22 @@ #define MIN(a,b) (((a) < (b)) ? (a) : (b)) -#include <sys/types.h> +#include <sys/param.h> /* defines used in kernel.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/kernel.h> /* types used in module initialization */ #include <sys/conf.h> /* cdevsw struct */ #include <sys/uio.h> /* uio struct */ #include <sys/malloc.h> #include <sys/bus.h> /* structs, prototypes for pci bus stuff */ -#include <pci/pcivar.h> /* For get_pci macros! */ +#include <machine/bus.h> +#include <sys/rman.h> +#include <machine/resource.h> + +#include <dev/pci/pcivar.h> /* For get_pci macros! */ +#include <dev/pci/pcireg.h> /* Function prototypes */ d_open_t mypci_open; @@ -61,7 +65,7 @@ open/close/read/write at this point */ int -mypci_open(dev_t dev, int oflags, int devtype, struct proc *p) +mypci_open(dev_t dev, int oflags, int devtype, struct thread *td) { int err = 0; @@ -70,7 +74,7 @@ } int -mypci_close(dev_t dev, int fflag, int devtype, struct proc *p) +mypci_close(dev_t dev, int fflag, int devtype, struct thread *td) { int err=0; --- archdoc.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312100751.hBA7pYwd000846>